html - Navigation on Website Positioned Incorrectly -


i'm converting portfolio mock html/css , i've come across has confused me.

http://www.mozazdesign.co.cc/

as can see, navigation text positioned in wrong place; want inline markers. i've looked through code loads , looked @ other websites can't figure out why it's not working..

this exact code:

<head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <link href="styles.css" rel="stylesheet" type="text/css" /> <title>mozazdesign portfolio</title> </head>  <body>  <div id="container">     <div id="header">         <div id="logo">          </div><!--end logo-->          <div id="nav">             <ul id="main_nav">                 <li><a href="#">home</a></li>                 <li><a href="#">about me</a></li>                 <li><a href="#">gallery</a></li>                 <li><a href="#">blog</a></li>                 <li><a href="#">contact</a></li>             </ul><!--end main nav-->         </div><!--end nav-->     </div><!--end header-->    </body>  body { padding: 0px; margin: 0px; background:url('images/background.png'); font-family: century gothic; }  #nav { text-decoration: none; color: white; }  #container { margin: 0 auto; width: 960px; }  #logo { background:url('images/logo.png'); height: 340px; width: 524px; float: left; margin-left: 0px;  <!--check--> }  #nav { background:url('images/nav_container.png'); width: 427px; height: 33px; float: right; margin-top: 100px;  }  #main_nav li { list-style-type: none; display: inline; font-family: century gothic; font-size: 18px; color: white; margin-right: 17px; } 

any ideas why isn't positioned correctly?

thanks in advance!

add new css class:

#main_nav {     position: relative;     top: -10px; } 

adjust top value until looks correct.

the relative position says 'position element naturally occurs' , can use 'top' , 'left' values (positive values move down , right, negative move or left) modify it's position it's relative position.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -