harvs899
11-07-2012, 11:25 PM
My html:
<!DOCTYPE html>
<html>
<head>
<link href="css/layout.css" type="text/css" rel="stylesheet" />
<title>Robert McBlain Solutions</title>
</head>
<body>
<div class="pagewrapper">
<a id="title"><img src= "Images/Logo.png"/></a>
<nav>
<ul = "navlist">
<li class="leftmost"><a href="" class="current">Home</a></li>
<li><a href="Services.html">About</a></li>
<li><a href="About.html">Services</a></li>
<li><a href="">Experience</a></li>
<li><a href="Contact.html">Testimonials</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</div>
</body>
</html>
CSS:
*{
margin: 0px;
padding: 0px;
}
body {
background-color: #AAAAAA;
}
.pagewrapper{
width: 960px;
margin: 10px auto 0px auto;
}
/*-----------HEADER----------*/
#title{
display: inline;
width: 100%;
float:right;
background-color: #FFFFFF;
}
nav{
width: auto;
height: 300px;
background-color:#F3F3F3;
margin: 30px auto 0px auto;
font-family: Georgia, Times, serif;
border-bottom: 1px solid grey;
}
nav ul{
margin:0px auto 0px auto;
padding:3px 0px 3px 0px;
text-align: center;
}
nav li{
display: inline;
font-size: 14pt;
padding: 0px 40px;
border-right: 1px solid gray;
}
nav li.leftmost{
border-left: 1px solid gray;
}
Basically the line that says 'margin: 30px auto 0px auto;' in the nav rule, doesn't seem to work, no space appears between the image above, and if I remove the top margin from the nav and set the bottom margin of the image all that happens is the ul moves vertically within the nav object, the nav itself doesn't move and therefore doesn't create the space I want, ideas?
Many thanks
<!DOCTYPE html>
<html>
<head>
<link href="css/layout.css" type="text/css" rel="stylesheet" />
<title>Robert McBlain Solutions</title>
</head>
<body>
<div class="pagewrapper">
<a id="title"><img src= "Images/Logo.png"/></a>
<nav>
<ul = "navlist">
<li class="leftmost"><a href="" class="current">Home</a></li>
<li><a href="Services.html">About</a></li>
<li><a href="About.html">Services</a></li>
<li><a href="">Experience</a></li>
<li><a href="Contact.html">Testimonials</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</div>
</body>
</html>
CSS:
*{
margin: 0px;
padding: 0px;
}
body {
background-color: #AAAAAA;
}
.pagewrapper{
width: 960px;
margin: 10px auto 0px auto;
}
/*-----------HEADER----------*/
#title{
display: inline;
width: 100%;
float:right;
background-color: #FFFFFF;
}
nav{
width: auto;
height: 300px;
background-color:#F3F3F3;
margin: 30px auto 0px auto;
font-family: Georgia, Times, serif;
border-bottom: 1px solid grey;
}
nav ul{
margin:0px auto 0px auto;
padding:3px 0px 3px 0px;
text-align: center;
}
nav li{
display: inline;
font-size: 14pt;
padding: 0px 40px;
border-right: 1px solid gray;
}
nav li.leftmost{
border-left: 1px solid gray;
}
Basically the line that says 'margin: 30px auto 0px auto;' in the nav rule, doesn't seem to work, no space appears between the image above, and if I remove the top margin from the nav and set the bottom margin of the image all that happens is the ul moves vertically within the nav object, the nav itself doesn't move and therefore doesn't create the space I want, ideas?
Many thanks