List Displaying Slightly Off Centered
I can't seem to figure out why my list is displaying slightly off center. I have some text below it in the same container that is 100% centered but the list seems to be padded slig
Solution 1:
All you need to do is add the following line to your CSS rule:
#navlist {padding:0}
and that will remove that extra left padding that you have. I tried to fix your css code a little bit using shorthand css lines (i.e. margin and font), hope that helps:
#footer_menu{
height:75px;
margin:0 auto;
text-align:center;
font-family:Arial, Helvetica, sans-serif;
text-decoration:none;
color:#000;
}
#footer {
height:75px;
width:1024px;
background-image: url('images/footer_img.jpg');
}
#navlist {padding:0}
#navlistli {
display:inline;
list-style-type:none;
padding-right:5px;
font-size:11px;
}
#navlistlia {
font:lighter 11px Arial, Helvetica, sans-serif;
color:#000;
text-decoration:none;
}
Solution 2:
Solution 3:
I'm not a huge fan of putting spacers inside of my <li>
elements. Normally if I need to do what you're trying to do, I use <p>
tags instead. See my code below:
HTML:
<divid="footer-menu"><p><ahref="#">Home</a> | <ahref="#">About</a> | <ahref="#">Archive</a> | <ahref="#">Get Involved</a> | Blog | <ahref="#">Contact</a></p><p>All content produced by <imgsrc="images/dblzerofilms.jpg"width="190"height="13" /> Copyright 2011</p></div>
CSS:
#footer-menu {
font: 11px/1 Arial, Helvetica, sans-serif;
text-align: center;
text-transform: uppercase;
color: #000; }
#footer-menua {
text-decoration: none;
color: #000;
margin: 05px;
display: inline-block; }
Preview: http://jsfiddle.net/Wexcode/Lb9XC/
Post a Comment for "List Displaying Slightly Off Centered"