CliffLandin
Programmer
I have a problem with a navigation bar that I created. Here is a link to the site It looks fine when I look at it on my Linux box using Firefox, but when I look at it using the Windows box using either Firefox or IE the navigation bar justifies to the left and I can't seem to get it to center. I have tried tables, divs, p aligns and most of the other tricks that I know. I have tried position on the stylesheet and that didn't seem to help.
This is the code for the navigation bar:
<ul id="nav">
<li><a href=" <li><a href="showroom.php">Showroom</a>
<div align="left">
<ul>
<li><a href="showroom.php?page=1">Dirt Bikes</a></li>
<li><a href="showroom.php?page=2">Street Bikes</a></li>
<li><a href="showroom.php?page=3">Mountain Bikes</a></li>
<li><a href="showroom.php?page=4">Snowmobiles/ATVs</a></li>
<li><a href="showroom.php?page=5">Miscellaneous</a></li>
</ul>
</div>
</li>
<li><a href="shopping.php">Shop Online</a>
<div align="left">
<ul>
<li><a href="shopping.php">Parts<font color="#cc0000">_</font>&<font color="#cc0000">_</font>Assecories</a></li>
<li><a href=" target="EBAY">Ebay Store</a></li>
</ul>
</div>
</li>
<li><a href="services.php">Dealer Services</a>
<div align="left">
<ul>
<li><a href="services.php?page=1">Suspension<font color="#cc0000">_</font>Services</a></li>
<li><a href="services.php?page=2">Service</a></li>
<li><a href="services.php?page=3">Parts Request</a></li>
</ul>
</div>
</li>
<li><a href="info.php">Dealer Info</a>
<div align="left">
<ul>
<li><a href="info.php?page=1">Contact</a></li>
<li><a href="info.php?page=2">Map and Hours</a></li>
<li><a href="info.php?page=3">Links</a></li>
</ul>
</div>
</li>
<li><a href="events.php">Events</a>
<div align="left">
<ul>
<li><a href="events.php?page=1">Events</a></li>
<li><a href="events.php?page=2">Instruction</a></li>
<li><a href="events.php?page=3">Tykes on Bikes</a></li>
</ul>
</div>
</li>
</ul>
[/color red]
and this is the stylesheet:
#nav, #nav ul {
padding: 0;
margin: 0;
list-style: none;
font-size: .9em;
font-weight: bold;
}
#nav a {
display: block;
width: 8em;
text-decoration: none;
color: #FFFFFF;
}
#nav a:hover {
display: block;
width: 8em;
text-decoration: none;
color: #000000;
}
#nav li {
float: left;
width: 8em;
background-color: #CC0000;
}
#nav li ul {
position: absolute;
width: 12em;
left: -999em;
font-size: .8em;
background-color: #CC0000;
}
#nav li:hover ul, #nav li.sfhover ul {
left: auto;
}
a {
color: #CC0000;
text-decoration: none;
font-family: sans-serif;
}
p {
font-size: 15px;
}
.bground {
background-image: url(imgs/soon.jpg);
background-repeat: no-repeat;
background-position: center;
}
h1 {
font-family: sans-serif;
font-size: 60px;
color: #333366;
}
h2 {
font-family: sans-serif;
font-size: 20px;
color: #333366;
line-height: 3px;
}
h3 {
font-family: sans-serif;
font-size: 12px;
color: #CC0000;
letter-spacing: 6px;
line-height: 1px;
}
h4 {
font-family: sans-serif;
font-size: 16px;
color: #000066;
}
[/color red]
If someone could help me out it would be greatly appreciated.
Thanks,
Tom
When in doubt, go flat out!
This is the code for the navigation bar:
<ul id="nav">
<li><a href=" <li><a href="showroom.php">Showroom</a>
<div align="left">
<ul>
<li><a href="showroom.php?page=1">Dirt Bikes</a></li>
<li><a href="showroom.php?page=2">Street Bikes</a></li>
<li><a href="showroom.php?page=3">Mountain Bikes</a></li>
<li><a href="showroom.php?page=4">Snowmobiles/ATVs</a></li>
<li><a href="showroom.php?page=5">Miscellaneous</a></li>
</ul>
</div>
</li>
<li><a href="shopping.php">Shop Online</a>
<div align="left">
<ul>
<li><a href="shopping.php">Parts<font color="#cc0000">_</font>&<font color="#cc0000">_</font>Assecories</a></li>
<li><a href=" target="EBAY">Ebay Store</a></li>
</ul>
</div>
</li>
<li><a href="services.php">Dealer Services</a>
<div align="left">
<ul>
<li><a href="services.php?page=1">Suspension<font color="#cc0000">_</font>Services</a></li>
<li><a href="services.php?page=2">Service</a></li>
<li><a href="services.php?page=3">Parts Request</a></li>
</ul>
</div>
</li>
<li><a href="info.php">Dealer Info</a>
<div align="left">
<ul>
<li><a href="info.php?page=1">Contact</a></li>
<li><a href="info.php?page=2">Map and Hours</a></li>
<li><a href="info.php?page=3">Links</a></li>
</ul>
</div>
</li>
<li><a href="events.php">Events</a>
<div align="left">
<ul>
<li><a href="events.php?page=1">Events</a></li>
<li><a href="events.php?page=2">Instruction</a></li>
<li><a href="events.php?page=3">Tykes on Bikes</a></li>
</ul>
</div>
</li>
</ul>
[/color red]
and this is the stylesheet:
#nav, #nav ul {
padding: 0;
margin: 0;
list-style: none;
font-size: .9em;
font-weight: bold;
}
#nav a {
display: block;
width: 8em;
text-decoration: none;
color: #FFFFFF;
}
#nav a:hover {
display: block;
width: 8em;
text-decoration: none;
color: #000000;
}
#nav li {
float: left;
width: 8em;
background-color: #CC0000;
}
#nav li ul {
position: absolute;
width: 12em;
left: -999em;
font-size: .8em;
background-color: #CC0000;
}
#nav li:hover ul, #nav li.sfhover ul {
left: auto;
}
a {
color: #CC0000;
text-decoration: none;
font-family: sans-serif;
}
p {
font-size: 15px;
}
.bground {
background-image: url(imgs/soon.jpg);
background-repeat: no-repeat;
background-position: center;
}
h1 {
font-family: sans-serif;
font-size: 60px;
color: #333366;
}
h2 {
font-family: sans-serif;
font-size: 20px;
color: #333366;
line-height: 3px;
}
h3 {
font-family: sans-serif;
font-size: 12px;
color: #CC0000;
letter-spacing: 6px;
line-height: 1px;
}
h4 {
font-family: sans-serif;
font-size: 16px;
color: #000066;
}
[/color red]
If someone could help me out it would be greatly appreciated.
Thanks,
Tom
When in doubt, go flat out!