Forum Moderators: not2easy

Message Too Old, No Replies

IE7 problem with position:relative divs

         

pairtube

1:36 pm on Mar 19, 2010 (gmt 0)

10+ Year Member



Hi,
I'm having a problem using divs that are 'positon:relative' to give a brief outline,

body{margin:0 auto; max-width:800px; min-width:800px}

and there are various correctly nested divs within the body some are 'postion:relative' others are not.

in firefox it works fine, open up the window everythin gis centred within the 800px body as specified, if i change the size of the window, the content all stays inline and the margin to the left and right decreases or increase as it should.

in IE7 , the divs that are not 'position:relative' remain central despite changes in window size, however the divs that ARE 'position:relative' do not follow the rest of the content when the window is resized.

is anyone able to help?

I'm using a strict xhtml doctype

thanks.

mack

8:12 am on Mar 24, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Welcome to WebmasterWorld :)

You could try using a container within your body and centering the container. Also make sure you are specifying the correct doctype.

#container{
margin:0 auto;
}

Mack.