Results 1 to 3 of 3

Thread: Navbar displays incorrectly in IE7 and Safari but correctly in FF,IE6,Opera [resolved

  1. #1
    Join Date
    Oct 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Navbar displays incorrectly in IE7 and Safari but correctly in FF,IE6,Opera [resolved

    I have a navbar that is slightly modified from the solid block example at http://www.dynamicdrive.com/style/cs...id-block-menu/.

    Everything works great on IE6, FF2, Opera9 but the menu is compressed and not rendered as intended on Safari and IE7. I've tried playing with a lot of different CSS settings such as widths on the <a> and <li> tags as well as adding !important. Nothing seems to work and I can't figure out why. I've got no other ideas. Please help. Thanks.

    The site is http://sinaiem.org. The relevant CSS is:
    Code:
    #navbar {	/* horizontal navbar on top inside container */
    	float: left;
    	background-color: transparent;
    	margin-left: 12%;
    	padding: 1.5em 0%;
    	}	
    	#navbar ul {
    		list-style: none;
    		height: 1.6em;
    		font-size: 0.8em;
    		border-left: 1px solid white;
    		
    		}
    		#navbar ul li {
    			float: left;
    			display: inline;
    			width: 11%;
    			background: black url(images/blockdefault.gif) center center repeat-x;
    			height: 100%;
    			border-right: 1px solid white;
    			}
    			#navbar ul li a {
    				display: block;
    				text-decoration: none;
    				height: 1.6em;
    				text-align: center;
    				width: 100%;
    				}
    			#navbar ul li a:link, a:visited , a:hover, a:active{
    				color: white;
    				}
    			#navbar ul li a:hover {
    				background: black url(images/blockactive.gif) center center repeat-x;
    				}
    			#navbar ul li a[class="selected"] {		/* use of attribute selector to choose the one in the toolbar that is currently selected , unsupported in IE6*/
    				background: black url(images/blockactive.gif) center center repeat-x;
    				}
    Last edited by dartanian; 10-04-2007 at 02:02 PM. Reason: resolved

  2. #2
    Join Date
    Oct 2007
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    #navbar { /* horizontal navbar on top inside container */
    float: left;
    background-color: transparent;
    margin-left: 12%;
    padding: 1.5em 0%;
    width: 80%;
    }

    I added the width ( width:80%and it worked.....you will have to test it to not push your outside container.....

    Hope this helps............

  3. #3
    Join Date
    Oct 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    That worked. 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
  •