Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other navigation and buttons

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #248465
    Seth-666
    Participant

    For a mainNav i use: “nav > ul > li > a” and now for 2 simple buttons i want to user just “nav > a” whts’s the differents between this 2 typs?

    #248466
    Shikkediel
    Participant

    They won’t be targeting the same element in any case. The latter will be a direct child a of nav that is outside of the ul.

    <nav>
     <a></a>
     <ul>
       <li>
         <a></a>
       </li>
     </ul>
    </nav>
    

    But maybe you can provide some HTML markup, the question’s not exactly clear. I’m assuming you’re not actually using button elements for example but that that was a figure of speech.

    #248467
    Seth-666
    Participant

    testing and learning :)) the some theme
    http://codepen.io/Seth-666/pen/xRPwEO

    here is . mainNAV in header and now simple button
    in your vision what is the difference .

    #248468
    Shikkediel
    Participant

    I don’t understand the question… what element exactly is the button? The only thing I suspect to be it, #logo, is not inside the nav. And then I’m not clear if the question is about the element itself or the selector to use for it.

    #248470
    Seth-666
    Participant

    the differents in – “body > header > div > nav” and “body > .content > nav > a” (just simple nav > a )
    because i see that i can style it the same , but is there i differents that i can’t see it? , don’t know about ? in you’re experience .. ?

    #248471
    Shikkediel
    Participant

    There is no nav &gt; a, the links inside the list items are nav a because they are nested inside other elements. The selector with &gt; demands that the a is a direct child of nav – or in other words a can only have nav as it’s direct parent. I don’t see that element anywhere.

    #249705
    Seth-666
    Participant

    why , when i hover on the nav items they get bigger or smaller?
    http://codepen.io/Seth-666/pen/ygyOwx
    padding: 5px 15px; in both active and hover … what’s wroung?

    #249711
    Paulie_D
    Member

    Adding the padding on :hover etc makes the buttons bigger … that’s expected.

    You need to make the padding default and then you don’t need it on :hover

    http://codepen.io/Paulie-D/pen/LxEyjo

    #249712
    Seth-666
    Participant

    so only on the link’s (a tags) ? is there something else that i have to pay attention when a make the nav?

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘Other’ is closed to new topics and replies.