Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-01-2010, 05:49 PM   PM User | #1
Lleoun
New Coder

 
Join Date: Feb 2008
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Lleoun is an unknown quantity at this point
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>
Lleoun is offline   Reply With Quote
Old 12-01-2010, 07:59 PM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
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
Excavator is offline   Reply With Quote
Old 12-02-2010, 11:54 AM   PM User | #3
Shaka Zorba
New Coder

 
Join Date: Sep 2010
Location: U S of A
Posts: 55
Thanks: 0
Thanked 11 Times in 11 Posts
Shaka Zorba is an unknown quantity at this point
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>
Shaka Zorba is offline   Reply With Quote
Reply

Bookmarks

Tags
horiznatl, internet explorer, list, vertically

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:27 AM.


Advertisement
Log in to turn off these ads.