Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Feb 2008
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet Explorer showing list vertically when it should be displayed horizontally

    Hi all,

    I've got a list of 3 buttons that need to display horizontally. All's good in FF but IE is stacking them directly on top of one another. My code for the list items is bellow.

    Thanks for your help

    Code:
    <style type="text/css"> 
             
             
                  #navigation { 
               list-style: none;
                margin: 0px 0px 0px 278px;
                padding: 0;
                text-align:left;
                z-index:1;    
           
            }
    
            #navigation li {
                display: inline-block;
            }
    
            #navigation a {
                display: block;
                width: 140px;
                height: 15px;
                background: url("http://aracelid.110mb.com/boton_ROLLOUT_08.png") no-repeat;
                padding: 10px 0.5em;
                color: #FFFFFF;
                text-decoration: none;
                font-size:12px;
                text-align: center;
            }
    
            #navigation a:hover {
                background: url("http://aracelid.110mb.com/boton_ROLLOVER_08.png") no-repeat;
            }
             
             
                   #one, #two,#three {background: url("http://aracelid.110mb.com/boton_ROLLOUT_08.png") no-repeat 0px 0px;}
                   
                 #one_div{width:140px;height:36px;}
        #two_div{width:140px;height:36px;}
        #three_div{width:140px;height:36px;}
      </style>
      
      </head>
      <body>
    
        <ul id="navigation"> 
            <li><a href="#" id="one" style="color:#FFFFFF;text-decoration:none;" ><div id="one_div">One</div></a></li> 
            <li><a href="#" id="two" style="color:#FFFFFF;text-decoration:none;"><div id="two_div" >Two</div></a></li> 
            <li><a href="#" id="three" style="color:#FFFFFF;text-decoration:none;"><div id="three_div" >Three</div></a></li> 
        </ul>

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,749
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello Lleoun,
    The first thing you should to is fix the errors in your code. Run it through the validator and see what it says. Both CSS and HTML validator links in my signature.

    Have a look at a tabbed button menu demo I have. Maybe it will help you.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    New Coder
    Join Date
    Sep 2010
    Location
    U S of A
    Posts
    92
    Thanks
    0
    Thanked 17 Times in 17 Posts
    Code:
    <style type="text/css"> 
             
             
                  #navigation { 
               list-style: none;
                margin: 0px 0px 0px 278px;
                padding: 0;
                text-align:left;
                z-index:1;    
           
            }
    
            #navigation li {
    	display: -moz-inline-stack;
            display: inline-block;
    	zoom: 1;
            *display: inline;
    
    
            }
    
            #navigation a {
                display: block;
                width: 140px;
                height: 15px;
                background: url("http://aracelid.110mb.com/boton_ROLLOUT_08.png") no-repeat;
                padding: 10px 0.5em;
                color: #FFFFFF;
                text-decoration: none;
                font-size:12px;
                text-align: center;
            }
    
            #navigation a:hover {
                background: url("http://aracelid.110mb.com/boton_ROLLOVER_08.png") no-repeat;
            }
             
             
                   #one, #two,#three {background: url("http://aracelid.110mb.com/boton_ROLLOUT_08.png") no-repeat 0px 0px;}
                   
                 #one_div{width:140px;height:36px;}
        #two_div{width:140px;height:36px;}
        #three_div{width:140px;height:36px;}
      </style>
      
      </head>
      <body>
    
        <ul id="navigation"> 
            <li><a href="#" id="one" style="color:#FFFFFF;text-decoration:none;" ><div id="one_div">One</div></a></li> 
            <li><a href="#" id="two" style="color:#FFFFFF;text-decoration:none;"><div id="two_div" >Two</div></a></li> 
            <li><a href="#" id="three" style="color:#FFFFFF;text-decoration:none;"><div id="three_div" >Three</div></a></li> 
        </ul>


  •  

    Tags for this Thread

    Posting Permissions

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