Horizontal CSS Block Menu Not Right in FF

Discussion in 'CSS' started by drywallinfoman, Mar 20, 2008.

  1. #1
    I have a nice horizontal block menu with CSS shown below that displays the 180 px wide blocks in IE, but not in FF. Is this fixable? Or am I doing something incorrect here?
    Thanks
    .topmenu {
    	font-family: Verdana, sans-serif;
    	font-style: normal;
    	font-weight: bold;
    	font-size: 11px;
    	color: #FFFFFF;
    	text-decoration: none;
    	background-color: #C4C4FF;
    	padding: 2px 2px 2px 8px;
    	width: 181px;
    	border-top: 1px solid #C4C4FF;
    	border-bottom: 1px solid #C4C4FF;
    	text-align: center;
    	display: inline-block;
    }
    
    .topmenu:hover {
    	font-family: Verdana, sans-serif;
    	font-style: normal;
    	font-weight: bold;
    	font-size: 11px;
    	color: #C4C4FF;
    	text-decoration: none;
    	background-color: #FFFFFF;
    	padding: 2px 2px 2px 8px;
    	width: 181px;
    	text-align: center;
    	display: inline-block;
    }
    
    Code (markup):

     
    drywallinfoman, Mar 20, 2008 IP
  2. drywallinfoman

    drywallinfoman Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I found a solution at http://www.accessify.com/tools-and-wizards/developer-tools/list-o-matic/
    Nice Tool!

    Sorry for the bother - I am a newbie at CSS bigtime.

    #navcontainer
    {
    margin: 0 0 0 0;
    padding: 0;
    height: 20px;
    }
    
    #navcontainer ul
    {
    border: 0;
    margin: 0;
    padding: 0;
    list-style-type: none;
    text-align: center;
    }
    
    #navcontainer ul li
    {
    display: block;
    float: left;
    text-align: center;
    padding: 0;
    margin: 0;
    }
    
    #navcontainer ul li a
    {
    background: #C4C4FF;
    width: 190px;
    height: 18px;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #ffffff;
    border-bottom: 1px solid #ffffff;
    padding: 0;
    margin: 0 0 0 0;
    color: #ffffff;
    text-decoration: none;
    display: block;
    text-align: center;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    	font-size: 12px;
    }
    
    #navcontainer ul li a:hover
    {
    color: #C4C4FF;
    background: #ffffff;
    border-top: 1px solid #C4C4FF;
    border-left: 1px solid #C4C4FF;
    border-bottom: 1px solid #C4C4FF;
    border-right: 1px solid #C4C4FF;
    }
    
    #navcontainer a:active
    {
    background: #c60;
    color: #fff;
    }
    
    #navcontainer li#active a
    {
    background: #c60;
    border: 1px solid #c60;
    color: #fff;
    }
    Code (markup):
    and
    
    <div id="navcontainer">
        <ul id="navlist">
    	<li><a href="index.html" title="Home Page">Home Page</a></li>
    	<li><a href="index.html" title="Page 2">Menu Item 2</a></li>
    	<li><a href="index.html" title="Page 3">Menu Item 3</a></li>
    	<li><a href="photos.html" title="Photos">Photos</a></li>	
    </ul>
    </div>
    Code (markup):
     
    drywallinfoman, Mar 20, 2008 IP
  3. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #3
    What might have happened in your old script was FF having trouble with display: inline-block. There's a mozilla-only version, which doens't work quite the same... FF3 will have this fixed, I've heard.
     
    Stomme poes, Mar 22, 2008 IP