Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help with drop down please.

    I have been trying to figure this out but having some difficulties.
    Maybe because its one a.m. and I just down some pre-workout? Idk.
    But I could really use your help with this matter, please!
    Trying to add a drop down menu to an existing WP Theme Code.



    Here is the HTML:

    <ul id="menu-menu-1" class="menu">
    <li id="menu-item-298" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-298">
    <li id="menu-item-299" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-299">
    <li id="menu-item-300" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-300">
    <li id="menu-item-302" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-302">
    <li id="menu-item-309" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-309">
    <a href="http://none">Revival Fire</a>
    <ul class="sub-menu">
    <li id="menu-item-310" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-310">
    <a href="http://www.heritagefellowship.com">Heritage Fellowship</a>
    </li>
    </ul>
    </li>
    </ul>


    Here is the CSS:

    .menu{
    float:right;
    font-size:1em;
    font-weight:600;
    margin-top:20px;
    }
    .menu li{padding: 0px 35px 0px 0px; float: left;}
    .menu li:last-child{padding:0px;}





    Thank you!

    Michael

  • #2
    New to the CF scene
    Join Date
    Jun 2014
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Why have such long classes this is not good practice in coding as it can make it difficult for someone else to identify. Something like lynda.com can be super helpful for learning techniques they have some amazing tutorials and from memory one on styling navigation in any way you could imagine. Subscription is key but you wont regret the outlay as it can help you develop skills. On the other hand if you could provide a link to something you want it to look like I will be more then happy to help but at the moment your css is short and its not going to give the nav any justice.

    TJ

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,965
    Thanks
    79
    Thanked 4,429 Times in 4,394 Posts
    The long class names are quite possibly needed for interaction with JavaScript on the page.
    Might be affecting how the display changes when the mouse is over the link, etc., etc.

    Note the the HTML is completely bogus, as he has multiple <li>s that have no matching </li>s.

    But I don't know how we are supposed to GUESS what effect he is after
    when he gives no CSS for the <ul class="sub-menu">
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •