Hi, Eric...

That worked...I had to using float: left (IE 6)...display: inline-block
didn't work...guess that works for other browsers?

Thanks for the help!

Rick


-----Original Message-----
From: Eric Shepherd [mailto:[EMAIL PROTECTED]
Sent: Monday, September 12, 2005 1:10 PM
To: [EMAIL PROTECTED]
Cc: css-discuss
Subject: Re: [css-d] New to CSS...Why isn't this horizontal?


You have nothing set on the <li> elements to tell them to stack
horizontally. You set display: inline-block on the <ul>, but the items
inside the <ul> will stack as normal, which is vertically.

Setting the display property on the <ul> will force it to sit
horizontally with other block-level elements which are SIBLINGS (e.g.
another <ul> after this one), but it won't cause the children (the
<li>s) to display horizontally.

Instead, take the display off of the <ul> and set it (or float:left)
on the <li> elements. Then they will line up horizontally.

On 9/12/05, Rick Faircloth <[EMAIL PROTECTED]> wrote:
> 
> Hi, all...
> 
> I'm new to trying to do things with CSS...considering
> using CSS instead of tables and seeing what can be done.
> 
> I'm trying to line up two DIV boxes horizontally.  Instead,
> they are still vertical...
> 
> What am I doing wrong?
> 
>         <UL Style="display: inline-block;
>                           list-style-type: none">
> 
>              <LI><DIV Style="top: 25px;
>                                left: 25px;
>                                height: 25px;
>                                width: 25px;
>                                margin: 5px;
>                                border: 1px solid black;">
>                                 </DIV></LI>
> 
>              <LI><DIV Style="height: 25px;
>                                width: 25px;
>                                margin: 5px;
>                                border: 1px solid black;">
>                                 </DIV></LI>
> 
>         </UL>
> 
> Thanks,
> 
> Rick
> 
> 
> 
> ______________________________________________________________________
> css-discuss [EMAIL PROTECTED]
> http://www.css-discuss.org/mailman/listinfo/css-d
> List wiki/FAQ -- http://css-discuss.incutio.com/
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
>

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to