html - Why is text not positioned properly within list element? -
this problem looks like:
here mark up:
<nav class="padding_bottom"> <ul> <li><a class="selected" href="#">home</a></li> <li><a href="#">music</a></li> <li><a href="#">contact</a></li> </ul> </nav>
and styling:
nav { height: 100%; } nav li { font-size: 3em; letter-spacing: -4.5px; text-transform: uppercase; } nav li:nth-child(2), nav li:nth-child(3) { margin-left: .25em; } nav { color: #dddddd; } nav a:hover, .selected { color: black; }
i can;t figure out why happening. i've played around wiht lot of styling elements see if changed, problem persisted.
@michaelpitluk:
it's caused -ve letter-spacing
, if remove background color extends expected. may need add padding or margin, whichever works best situation, <a>
elements.
Comments
Post a Comment