|
|
#1 (permalink) |
|
DemonicAngel
Super #1
Joined in Aug 2004
Lives in Wherever The World Takes Me
Hosted on Pass76
1,847 posts
Gave thanks: 28
Thanked 35 times
|
Evil UL...?
Here's a screen shot of the issue [click]
Um... Ignore the "<- Used without permission" my friend did it and she's been telling me to work on the design and I'm striking back at her...? Anyways, The issue is I'm using a list and I try to center it, but it won't center... The CSS is: Code:
#menu {
text-align: center;
}
#menu ul {
list-style: none;
margin: 0;
padding: 0;
text-align: center;
}
#menu ul li {
float: left;
}
#menu ul li a {
padding-top: 4px;
background-color: #A0B9C9;
display: block;
width: 80px;
height: 20px;
text-decoration: none;
border-left: 1px #FFFFFF solid;
border-right: 1px #FFFFFF solid;
color: #FFFFFF;
}
#menu ul li a:hover {
padding-top: 4px;
background-color: #2F6F99;
text-decoration: none;
border-left: 1px #FFFFFF solid;
border-right: 1px #FFFFFF solid;
color: #FFFFFF;
}
.centered {
margin: 0 auto 0 auto;
}
Code:
<div id="menu" align="center"> <ul class="centered"> <li><a href="#">Home</a></li> <li><a href="#">Places</a></li> <li><a href="#">People</a></li> <li><a href="#">Food</a></li> </ul> </div> If I should post the whole page of code, then I will. I have tried the center tag, align="center" and some other things... Thanks for any help offered. |
|
|
|
|
|
#2 (permalink) |
|
Registered User
Super #1
Joined in Mar 2005
Lives in Washougal, WA
1,306 posts
Gave thanks: 23
Thanked 39 times
|
Put a width on the #menu and see what happens.
Code:
<div align="center"> <div id="menu"> <ul class="centered"> <li><a href="#">Home</a></li> <li><a href="#">Places</a></li> <li><a href="#">People</a></li> <li><a href="#">Food</a></li> </ul> </div> </div> |
|
|
|