Forum Moderators: not2easy

Message Too Old, No Replies

Floated IMG hidden when nested in DIV (IE windows)

CSS layout works in Mozilla, Safari, and IE on Mac, but not on IE Windows

         

everettg_99

2:55 am on Jul 28, 2003 (gmt 0)

10+ Year Member


I've just converted my site to a CSS layout. Thanks to www.bluerobot.com and
http://www.meyerweb.com/eric/css/edge/

I'm using DIVs as sectional dividers (each DIV may contain several paragraphs). Now when I float an image, it gets buried by the sectional DIV. The text is wrapping around it correctly, but the image is underneath the DIV. Mozilla, Safari, and IE on Mac display it correctly, but IE Windows does not.

My HTML:
<img class="L" ...etc etc../>

My style sheet:

img.L {
float: left;
display: block;}

But no dice. I even tried wrapping the IMG tags with DIV tags and then tried floating those, but that didn't work either. I've also tried changing with the z-index of the DIVs, but that didn't work either. I've also tried using "clear: both" in the IMG and DIV styles.

What am I missing? I've heard of IE's float problems, but I don't think this is it (I'm not declaring widths anywhere), and I've tried changing my DOCTYPE declaration so the IE 6 on Windows will use the strict settings (I tried transitional too). I should mention that the same style sheet floats images perfectly when I use tables to section off several paragraphs.

Many thanks-
Everett

DrDoc

3:50 am on Jul 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to Webmaster World!

Have you tried adding position:relative to the class?

everettg_99

4:58 am on Jul 28, 2003 (gmt 0)

10+ Year Member



Wow. That did it. Thanks!

DrDoc

6:16 am on Jul 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member


You're welcome!
the bug is described in deeper detail here:
http://www.evolt.org/article/MSIE6_bug_with_floating_divs_and_spacers/17/23899/

wilderness

11:31 pm on Jul 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm hoping somebody can help me?
I'm planning to convert my table layout sites to Styles. I've looked at some online stuff even purchased a book ( CSS By Example,) the book covers some basics rather good. However, it does not provide an example of what I desire
to accomplish.

I'm looking to use a floating text which wraps around a menu (provided in this example)
[glish.com...]
the problem with the above is that when I view the source, the menu content shows before the actual text content.
My goal here is in having the SE's read the content and then the menu.

An example of that is below, however in the below example the text is NOT floating.
[bluerobot.com...]

Might somebody offer a solution or point me to a link which provides some more extensive explanation?
Thanks in advance

Please disreagrd. Had A reply in alt.html

[usenet.alt-html.org...]