Jump to content

Alignment & Width with IE


rockinaway

Recommended Posts

My website works fine in Firefox.

 

You can see it here: http://www.etcworld.co.uk/

 

I want it centered with a max width of 795px. However, in IE, it forgets this and stretches the page edge-to-edge of the browser. When I removed 'margin:auto' from the CSS, then the IE page pushed off the edge like I wanted it to, but it's width didn't decrease.

 

What should I do?

Link to comment
https://forums.phpfreaks.com/topic/100532-alignment-width-with-ie/
Share on other sites

I was looking over your source and saw you're using tables - is there any way to eliminate this? Tables arent the best play toy. I'm not saying they're a sin to use... they just don't play well.

 

For a centered margin layout. You want to have a main container holding everything. This main container is set to margin: 0, auto.

 

the following containers inside should float left/right or be positioned relative.

 

I know this is a step back, but understanding this technique will save A LOT of head aches. Once you get the ball rolling its really not hard to understand and you'll forever wonder why tables even existed.

 

Keep posting with questions though!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.