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
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!

Link to comment
Share on other sites

That's beyond the scope of a single thread. You should look into learning CSS, that is the coding you will use to replace tables.

 

Tables do have their place - for tabular data (cross referencing data in columns and rows). They just aren't good for layout.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.