Forum Moderators: not2easy

Message Too Old, No Replies

IE Mac div

side by side finally got it to work

         

bgirl

8:07 am on Nov 21, 2004 (gmt 0)

10+ Year Member



This thread was exactly what I was trying to do -

[webmasterworld.com...]

...which is to have two divs side by side in IE Mac. (other browsers worked just fine using floats). Tables woulda probably been faster, but once I started I wanted to see it work!


<div class="item">
<div class="pic">IMAGE floats left</div>
<div class="description">TEXT aligns to right of image</div>
</div>

I used the "band pass filter" (a million thanks to Tantek Celik)
[stopdesign.com...]

/*\*//*/
@import "ie5mac.css";
/**/

Place this mac hack in a <style> tag in your html to bypass your main style sheet.

Then play with negative margins to position the divs where floats don't float on de mac.

bgirl

8:14 am on Nov 21, 2004 (gmt 0)

10+ Year Member



forgot to add the problem IE Mac was having was that it was pushing the second div (the description) down below the picture. Other browsers correctly displayed the div to the right of the picture.

.item {width:500px; clear:left;}
.pic {float:left; display:inline;}
.description {text formatting stuff here}

what worked on IE Mac


.item {width:500px; clear:left;}
.pic {nothing here}
.description { margin: -50px 0px 0px 50px; display:block; padding:5px; plus text formatting stuff;}

Span

2:44 pm on Nov 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Actually, if I remember well, it's the clear:left; on an element containing floats that IE/Mac has problems with (it inherits), not the floating itself.

bgirl

8:08 pm on Nov 21, 2004 (gmt 0)

10+ Year Member



It was a late night... forgot to remove the clear:left! Thanks.

Do clear:both; and clear:right; have the same problems clear:left; does? Do you know why mac ie is so fussy with clears? I remember soemthing about IE Mac not clearing divs automatically, whatever that means.