- This topic is empty.
-
AuthorPosts
-
November 29, 2016 at 2:45 pm #248465Seth-666Participant
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?
November 29, 2016 at 3:12 pm #248466ShikkedielParticipantThey won’t be targeting the same element in any case. The latter will be a direct child
a
ofnav
that is outside of theul
.<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.November 29, 2016 at 3:32 pm #248467Seth-666Participanttesting and learning :)) the some theme
http://codepen.io/Seth-666/pen/xRPwEOhere is . mainNAV in header and now simple button
in your vision what is the difference .November 29, 2016 at 4:12 pm #248468ShikkedielParticipantI don’t understand the question… what element exactly is the button? The only thing I suspect to be it,
#logo
, is not inside thenav
. And then I’m not clear if the question is about the element itself or the selector to use for it.November 29, 2016 at 4:20 pm #248470Seth-666Participantthe 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 .. ?November 29, 2016 at 4:38 pm #248471ShikkedielParticipantThere is no
nav > a
, the links inside the list items arenav a
because they are nested inside other elements. The selector with>
demands that thea
is a direct child ofnav
– or in other wordsa
can only havenav
as it’s direct parent. I don’t see that element anywhere.January 4, 2017 at 3:40 pm #249705Seth-666Participantwhy , 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?January 5, 2017 at 12:25 am #249711Paulie_DMemberAdding 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
January 5, 2017 at 1:31 am #249712Seth-666Participantso only on the link’s (a tags) ? is there something else that i have to pay attention when a make the nav?
-
AuthorPosts
- The forum ‘Other’ is closed to new topics and replies.