Results 1 to 2 of 2

Thread: Need help with code-nav bar etc.

  1. #1
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Need help with code-nav bar etc.

    Please help me to correct this! I am trying to make the logo appear on the left, aligned with "home" but something is going wrong and when I look at it in both Firefox and Safari, it is to the right of the nav bar.

    My CSS looks like this:

    Code:
    body {
    	font-family:Arial, Helvetica, sans-serif;
    	background-image:url(images/bkgimage.gif);
    	background-repeat:repeat-x;
    	}
    
    #dabox {
    	display:block;
    	margin-left:auto;
    	margin-right:auto;
    	margin-top: 0em;
    	width:950px;
    	font-family: Arial, Helvetica, sans-serif;
    	}
    	
    #topnav {
    	margin: -2em 0em 3em -30px;
    	list-style: none;
    	}
    
    #topnav li {
    	float: left;
    	margin-top: 0px;
    	}
    	
    #topnav li a {
    	display: block;
    	padding: 6px 15px;
    	text-decoration: none;
    	font-size:14px;
    	font-weight: bold;
    	color: #30422b;
    	font-family: Arial, Helvetica, sans-serif;
    	}
    
    #logo {
    	z-index:200;
    	}
    My HTML looks like this:

    Code:
    <body>
    
    <div id="dabox">
    
    <div>
    <ul id="topnav">
            <li><a href="#">Home</a></li>
            <li><a href="pages/about_us/about_us.html">About Us</a></li>
            <li><a href="pages/industry_news.html">Industry Resorces</a></li>
            <li><a href="pages/investors.html">Investors</a></li>
        </ul>
    </div>
    
    <div id="logo">
    <img src="images/logo.png" />
    </div>
    
    </div>
    </body>
    please help! let me know if i'm doing something terribly wrong. I never had any real CSS/HTML training.

  2. #2
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Resolved

    Sorry for wasting anyone's time! I fixed this by adding this to the CSS:

    position: absolute;
    top: 50px;

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •