IE 6 and CSS margins

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
9/26/2009 11:41:01 AM
Gravatar
Total Posts 190

IE 6 and CSS margins

Hi All,

Can anyone please point to threads or other resources for dealing with CSS in IE 6? I would thing the issue I'm having is something many people would have encountered already. I've tended to fallback to tables in the past instead of dealing with all the browser inconsistencies but I'm really trying to be a CSS purist with the mojoPortal templates I'm working on.

One specific issue I'm having is with divs wrapping in IE 6 (I'm developing on a machine with IE 8 and I haven't really yet seen what 7 might look like either). I've run across some posts and articles about a bug in IE 6 that adds to margins on floated divs. So I have a div to wrap the page content with a fixed width of 980px and auto right and left margins so the div stays centered on the page. The widths for the various states of the three content divs are divided accordingly with margins set where necessary. IE 6 always wants to wrap the third content div below the first two. It's very annoying. (Hmm, might it work better to use padding instead of margins? I'll have to try that.)

The other odd thing I just noticed yesterday is that when the page first loads, all the content is flush left in the sucky IE 6 browser window and some of the page elements are scattered around the screen in places they don't belong. Only if you hit the refresh button does the content settle to the center and the page looks as it should. It's very weird.

Anyway, if anyone recognizes these oddities and has already worked them out, I would certainly appreciate your input.

Many thanks,

John

9/26/2009 11:50:20 AM
Gravatar
Total Posts 18439

Re: IE 6 and CSS margins

All I can tell you is you should always design using Firefox as it is the most standards compliant.

Then anything that does not look right in IE 6 you can fix by overriding the css in the IESpecific.css file in your skin folder and you can correct IE 7 using the IE7Specific.css. So maybe you need to make column widths a little smaller in IE 6 to keep them from wrapping.

Generally there are less issues with IE 8 but in the next release it will be possible to include an IE8Specific.css file if needed.

Hope it helps,

Joe

9/26/2009 12:11:01 PM
Gravatar
Total Posts 190

Re: IE 6 and CSS margins

Yes, Firefox and Google Chrome (and probably most everything else) look just as they should. It's IE that's giving me issues. I will try some adjustments with the IEspecific css and see what happens. Thanks again. (Do you ever take a day off, Joe?)

You must sign in to post in the forums. This thread is closed to new posts.