The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › [Solved] Make hover BG fill up the li navigation
Hey smart folks, help needed pls.
Here’s my codepen
http://codepen.io/waggawagga/pen/QwbBMx
On hover, I’m trying to have that green BG fill the whole space, the best example is here, see how the hover fill the whole li nav? Up to the 1px border? That’s what I’ll like to achieve, maybe you can help?
http://themes.danyduchaine.com/fit/
Thanks
It’s always best to size anchors from the inside out..so your padding should be on the a not the li.
a
li
Also with inline-block you need to account for the whitespace.
inline-block
whitespace
Here I use I eliminate that by using the font-size:0 trick.
font-size:0
http://codepen.io/Paulie-D/pen/qEdQyZ
Paulie you’re such an asset, 2nd problem I’ve had and you’ve helped both times, thank you so much mate…seriously!