IE floating and margin problems (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets and Accessibility



Message


spinningjennie -> IE floating and margin problems (9/12/2006 23:40:53)

I've created a page with 2 rows of content that are not in a table. The floats and margins are working in FireFox but not in IE. (I'm aiming for xhtml 1.0 strict). I'm fairly new at basing my whole layout on CSS and xhtml.

Here's the page:
On the 1st 'row' of content I want there to be some text on the left and an image on the right.
On the 2nd 'row' of content I want there to be an image on the left and some text on the right.
I don't want the text beside the image to wrap around the image.

I'm getting very weird spacing in IE and for the life of me can't work it out. You'll see that I have my basic stylesheet and an additional hack stylesheet to see if that would help in case the floating was part of the problem. All to no avail.

Any assistance much appreciated.
spinningjennie





Tailslide -> RE: IE floating and margin problems (9/13/2006 2:41:10)

Wow - that's pretty freaky even for IE!!

Personally, I wouldn't use a list for your two sections there (not really a list) - I'd just use floated images and paragraphs.

Here's a test version I did like that: http://www.littleblueplane.com/test/jennie.html The CSS rules that I added to control this are labelled, down the bottom of your stylesheet. No IE hack stylesheet used.

edit: jeez - what's wrong with me today? I meant to say I wouldn't use a list for that! Sorry for any confusion.




Nicole -> RE: IE floating and margin problems (9/13/2006 3:14:40)

Bizarre that you shouldn't want text wrapping under the images when I just read how to do this today. Here's a link:

http://www.dynamicdrive.com/style/csslibrary/item/floating-image-with-no-text-wrap/

hth

Nicole




Tailslide -> RE: IE floating and margin problems (9/13/2006 5:58:22)

Oops! Somehow I missed the bit about the text not wrapping under the photos - I've changed the example page given to reflect that.

http://www.littleblueplane.com/test/jennie.html




spinningjennie -> RE: IE floating and margin problems (9/13/2006 8:55:08)

Thanks so much Tailslide. Very clearly and simply presented, as usual!

Useful link, Nicole! Thankyou.

spinningjennie




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
6.298828E-02