Hi guys I was wondering if any of you could help me. I am trying to create my own template right now and currently running into some problems. Firstly my website banner renders behind the nav bar which is already there. screenie - http://gamercity.co.uk/problem.png code - body { background-color:Blue; } #header { background-image:url('media/gamercity banner bg.png'); background-repeat:repeat-x; height:149px; } .solidblockmenu{ margin: 0; padding: 0; float: left; font: bold 13px Arial; width: 100%; overflow: hidden; margin-bottom:0; border: 1px solid #ffffff; border-width: 1px 0; background: black url(media/blockdefault.gif) center center repeat-x; } .solidblockmenu li{ display: inline; } .solidblockmenu li a{ float: left; color: white; padding: 9px 11px; text-decoration: none; border-right: 1px solid white; } .solidblockmenu li a:visited{ color: white; } .solidblockmenu li a:hover, .solidblockmenu li .current{ color: white; background: transparent url(media/blockactive.gif) center center repeat-x; } Code (markup): index.htm <!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> <title></title> <link rel="Stylesheet" href="StyleSheet.css" type="text/css"> </head> <body> <ul class="solidblockmenu"> <li><a href="#">Home</a></li> <li><a href="#" class="current">CSS Examples</a></li> <li><a href="#">Forums</a></li> <li><a href="#">Webmaster Tools</a></li> <li><a href="#">JavaScript</a></li> <li><a href="#">Gallery</a></li> </ul> <div id="header"> <img src="media/Gamercity-logo-01.png" alt="Gamercity" /> </div> </body> </html> Code (markup): So any ideas?
I want to keep the navbar and move the banner so that it is inline with the logo. Like the banner is being rendered partially behind the navbar and I want it to render immediately below the navbar like the logo hope this clears it up!
If I am understanding correctly, your "banner" is a background image running behind your logo. Since your menu isn't contained in a DIV, the header DIV is treating it like text, and not a container. Therefore I recommend enclosing your menu in a DIV. If you choose to not do so, you can change your CSS to move the background down: Current CSS: background-image:url('media/gamercity banner bg.png'); background-repeat:repeat-x; Change to: background: url('media/gamercity banner bg.png') left 30px repeat-x; (this is short hand) Hope this helps