[thelist] IE UL/OL float left bug?

Kazzablanka kazza at pandora.be
Fri Dec 27 09:50:01 CST 2002


I just thought about this for a while and come on to the following.
ul/li elements are in fact block elements. It means that when you close the
<li> tag, and start a new list item the text will display on the next line.
So using a float:left; doesn't make  any sense.
But you can always enclose your <ol> / <li> in a div which can float:

<style type="text/css">
<!--
div.container {
  float: left;
}
-->
</style>
</head>
<body>
<div class="container"> -->
    <ol>
        <li>Hello</li>
        <li>Hello</li>
    </ol>
</div>
</body>

This achieves the same effect as you wanted to happen with the ul/ol
float:left rule


----- Original Message -----
From: "Mark Groen" <mark at markgroen.com>
To: <thelist at lists.evolt.org>
Sent: Friday, December 27, 2002 3:29 PM
Subject: RE: [thelist] IE UL/OL float left bug?


> On December 27, 2002 at 8:26, fstorr wrote:
>
> > It seems so, I've had this problem before when the list was nested in
> > tables. just add a left margin to your ul or ol:
> >
> > ul {
> >     margin-left: 12px     /* 12px did the trick for me in IE6 */
> > }
> >
> > ++++
> >
> > Mm, weird.  That doesn't work for me at all, no matter what size I
> > make the margin.  Running IE6, SP1.
>
> Did you just cut n' paste this sample? It's missing the semi-colon.
>
>
> Regards,
>
> Mark Groen
>
> MG Web Services
> Web Site Hosting and Development
> www.markgroen.com
> mark at markgroen.com
> 604-780-6917
> --
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>
>





More information about the thelist mailing list