February 22, 201214 yr Hello, I'm tying to get this menu to get aligned with the logo but it appears to go out of place when I open it in a browser. Here is the code. <!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" /> <link rel="stylesheet" href="css/layout.css" type="text/css" media="screen" /> <title>Untitled Document</title> </head> <body> <div id="wrapper"> <div id="header"> <div id="logo"></div><!-- Logo ends--> <header> <div> <nav> <ul class="menu"> <li class="current"><a href="index.html"><b><em>Home</em></b></a></li> <li><a href="index-2.html"><b><em>Products</em></b></a></li> <li><a href="index-3.html"><b><em>Pricing</em></b></a></li> <li><a href="index-4.html"><b><em>Contact</em></b></a></li> </ul> </div> </header> </div><!-- Header ends--> </div> </body> </html> body { margin: 0px; padding:20px; background:url('../images/bg.png') repeat; font-family: Arial,Helvetica,sans-serif; font-size: 14px; color: #00000; } #wrapper{ margin: 0 auto; width:970px; height: 0 auto } /**************************** Header ******************/ #header{ width:970px; height:129px; background:url(../images/head_bg.png); } #logo { float:left; width:190px; height:80px; margin-top: 14px; margin-left: 38px; background: #0F3; } /**************************** Menu ******************/ ul.menu { list-style: none outside none; margin: 0; padding: 0; } ul.menu li { display: inline; float: left; margin: 65px 14px 0 0; padding: 0; } ul.menu li a { color:#CCC; float: rig; font-size: 1.66em; font-style: italic; margin: 0; padding: 0 13px 0 0; text-decoration: none; text-transform: none; } ul.menu li a b { display: block; font-weight: normal; line-height: 28px; padding-left: 13px; } ul.menu li a em { display: block; font-style: normal; font-weight: normal; } ul.menu li a:hover { background: url(images/menu_right.png) no-repeat scroll right top transparent; color: #FFFFFF; padding-right: 13px; text-decoration: none; } ul.menu li a:hover b { background: url(images/menu_left.png) no-repeat scroll left top transparent; padding-left: 13px; } ul.menu li a:hover em { background: url(images/menu_middle.png) repeat-x scroll left top transparent; } ul.menu .current a { background: url(images/menu_right.png) no-repeat scroll right top transparent; color: #FFFFFF; padding-right: 13px; text-decoration: none; } ul.menu .current a b { background: url(images/menu_left.png) no-repeat scroll left top transparent; padding-left: 13px; } ul.menu .current a em { background: url(images/menu_middle.png) repeat-x scroll left top transparent; } /**************************** Menu End ******************/ /**************************** Header End ******************/
February 22, 201214 yr First off you have 2 headers, <Header> and Div Header, not sure why you would want to use 2. It's better to provide the site in question so we can use firebug on it and give you a direct answer, I personally rather do that than shifting though all your code
Create an account or sign in to comment