Joel 0

Why is the navigation messed up in Firefox?

2 answers

danwellman 5600
3
points

The <ul> still has margin on it - #nav ul { margin:0; }

Answered about 7 years ago by danwellman
1
point

try this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
#wrapper {
        width: 960px;
}
#header {
        width: 960px;
        background:#F00;
        height:100px;
        position:relative;
}
#nav{
        background:#0F0;
        height:30px;
        position:absolute;
        width:900px;
        top:75px;
        left: 0
}

#nav ul{
    margin: 0;
    padding: 0;
}
#nav ul li{
        float: left;
        margin-left: 0px;
        padding: 5px;
        list-style:none;
        }
#nav ul li a {
                text-decoration:none;
}


-->
</style>
</head>

<body>
<div id="wrapper">
        <div id="header">
        <div id="nav">
                <ul>
                <li><a href="#">Home</a></li>
                <li><a href="#">News</a></li>
                <li><a href="#">Biography</a></li>
                <li><a href="#">Gallery</a></li>
                <li><a href="#">Contact Us</a></li>
            </ul>
        </div>
    </div>
</div>
</body>
</html>
Answered about 7 years ago by Tony Crockford