- This topic is empty.
Viewing 11 posts - 1 through 11 (of 11 total)
Viewing 11 posts - 1 through 11 (of 11 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I have set on my nav li a a border right how would I remove the very last border?
Use last:child
some thing like this #rightNav li a: last child {border-right: none
I did this #rightNav li a:last-child { border-right: 0px; } removed all
Didn’t know about that @jamy_za, I use :last-child quite often… In the event you are doing a border-left and a border-right (one light one dark effect) and you didn’t want to use :last-child for the above reason you could manually give the last one a class of last and style that with border-right: 0px; too.
`border-right: none` should work.
If not, try the solution given by @jamy_za
Here is code pen sample http://codepen.io/mwbcomputers/pen/wfyel
this
#rightNav a:last
is not this
#rightNav a:last-child
Go it working in code pen
In any case, in your Codepen you have added the border to the `li` not the `a` so it should be
#rightNav li:last-child
I agree with @jamy_za, I always use `first-child` for the extra browser support.