Reputation: 1313
I'm trying to achieve the same thing IN THIS EXAMPLE ...i want my navigation to be like on that website.
HTML
<div id="container">
<div id="nav"></div>
</div>
CSS
#container {
width: 980px;
margin-left: auto;
margin-right: auto;
text-align: left;
}
#nav {
width: 100%
background: #585858;
height: 37px;
}
I'm tryting to get the same effect as repeat-x;
for the nav
Upvotes: 0
Views: 142
Reputation: 3193
#container
{
width:980px;
}
#nav{
position:absolute;
left:0;
right:0;
/*...no need of width:100%;..*/
}
Upvotes: 1
Reputation: 1327
Maybe you want to achieve something like this: http://jsbin.com/oWeKiqa/2/
Try this on your CSS:
#container {
width: 980px;
margin-left: auto;
margin-right: auto;
text-align: left;
}
#nav {
width: 100%;
background: #585858;
height: 37px;
left: 0;
display: block;
position: absolute;
}
Upvotes: 1
Reputation: 10619
Add overflow:hidden;
to container div and don't forget that you have a typo as you forget to add ;
at the end of width
property so its not being applied.
Upvotes: 0