Results 1 to 3 of 3

Thread: alignment of navigation bar

  1. #1
    Join Date
    Jul 2010
    Posts
    64
    Thanks
    23
    Thanked 0 Times in 0 Posts

    Default alignment of navigation bar

    Hello everyone,

    I created a navigation bar using css sprite described at the following website: http://www.tutorial9.net/web-tutoria...h-css-sprites/

    Everything went fine and I like the result however the first button appears 40px too far from the left. I checked the whole script and I can't find the error. Can someone please help me?

    thanks in advance,
    Rosalie

    Hereby my css:
    Code:
    #navBarContainer{
    	width: 950px;
    	height: 23px;
    	margin: 0px 0px 0px 0px;
    	background-color: #000;
    }
    
    ul#navBar{
    	width: 950px;
    	height: 23px;
    	margin: 0 auto;
    	list-style: none;
    	background-color: #000;
    }
    
    ul#navBar li{
    	display: inline;
    }
    
    ul#navBar li a{
    	height: 23px;
    	float: left;
    	text-indent: -9999px;
    }
    
    ul#navBar li#navBarListingsCurrent a{
    	width: 95px;
    	
    }
    
    ul#navBar li#navBarListings a{
    	width: 95px;
    
    }
    
    ul#navBar li#navBarListings a:hover{
    	background-position: 0 -23px;
    }
    
    ul#navBar li#navBarListings a:active{
    	background-position: 0 -46px;
    }
    
    ul#navBar li#navBarSearch a{
    	width: 89px;
    
    }
    
    ul#navBar li#navBarSearch a:hover{
    
    }
    
    ul#navBar li#navBarSearch a:active{
    	background-position: -95 -46px;
    }
    
    ul#navBar li#navBarSellyourpiece a{
    	width: 163px;
    
    }
    
    ul#navBar li#navBarSellyourpiece a:hover{
    
    }
    
    ul#navBar li#navBarSellyourpiece a:active{
    	background-position: -184 -46px;
    }
    
    ul#navBar li#navBarOpenyourownshop a{
    	width: 232px;
    
    }
    
    ul#navBar li#navBarOpenyourownshop a:hover{
    
    }
    
    ul#navBar li#navBarOpenyourownshop a:active{
    	background-position: -347 -46px;
    }
    
    ul#navBar li#navBarYouraccount a{
    	width: 170px;
    
    }
    
    ul#navBar li#navBarYouraccount a:hover{
    
    }
    
    ul#navBar li#navBarYouraccount a:active{
    	background-position: -579 -46px;
    }
    #hope {
    	color: #F00;
    	height: 23px;
    	width: 10px;
    }
    #innavbar {
    	background-color: #F00;
    	height: 23px;
    	width: 10px;
    	margin-left: 900px;
    }
    Last edited by Rosalie; 09-28-2010 at 11:04 AM.

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Default browser padding add

    Code:
    Padding:0;
    to ul#navbar

    or

    Code:
    ul#navBar{
    	width: 950px;
    	height: 23px;
    	margin: 0 auto;
    	list-style: none;
    	background-color: #000;
    	Padding:0;
    }
    Corrections to my coding/thoughts welcome.

  3. The Following User Says Thank You to bluewalrus For This Useful Post:

    Rosalie (09-26-2010)

  4. #3
    Join Date
    Jul 2010
    Posts
    64
    Thanks
    23
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by bluewalrus View Post
    Default browser padding add

    Code:
    Padding:0;
    to ul#navbar

    or

    Code:
    ul#navBar{
    	width: 950px;
    	height: 23px;
    	margin: 0 auto;
    	list-style: none;
    	background-color: #000;
    	Padding:0;
    }
    Amazing, it worked. So many thanks

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
  •