MyBB Community Forums

Full Version: How do I stretch my navbar accross the container?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[Image: fwregf.png]

As you can see, my navigation bar doesn't go across the entire container and I want it to.

Here's my CSS:

.menu ul {
	background:#000000 url(images/problue/nbg.png);
	list-style-type:none;
	width:100%;
	height:50px;
	margin:0;
	padding:0;
        text-align:center;
	}

.menu li {
	float:left;
	}

.menu ul a:link {
	color:white;
	display:block;
	padding:15px;
	text-align:center;
	text-decoration:none;
	}

.menu ul a:visited {
	color:white;
        display:block;
        padding:15px;
        text-align:center;
        text-decoration:none;
}

.menu ul a:active {
	color:white;
        display:block;
        padding:15px;
        text-decoration:none;
}

	
.menu ul a:hover {
	background:url(images/problue/nbgh.png);
	height:20px;
	}

Any advice?
Assuming you have 20px of padding on the container, put this on .menu ul:

margin: 0 -20px;
Thanks Ferron, but that didn't seem to work... :\

Any other ideas?

Scratch that, I ended up getting it work work, I did:

.menu ul {
	background:#000000 url(images/problue/nbg.png);
	list-style-type:none;
	width:100%;
	height:50px;
	margin: 0;
	padding:-20px;
        position:relative;
        left:-20px;
        text-align:center;
	}