...

View Full Version : Website centred in IE but not firefox?



noneforit
05-28-2009, 02:02 PM
Hello

For once its a firefox issue and not IE!

I have a website that centres in IE but not firefox.


www.noneforit.com/marie/index.html

The #wrapper div id set to margin: o auto and the width is width:80%

Any ideas

Thanks

abduraooft
05-28-2009, 02:30 PM
#inner {/*Main.css (line 17)*/
border:3px solid #000000;
height:930px;
margin:auto;
/*width:950px;*/
}
#header {/*Main.css (line 24)*/
background-image:url(images/Header2.jpg);
background-position:center;
background-repeat:no-repeat;
border-bottom:3px solid #000000;
height:140px;
/*width:950px;*/
}

In short, you don't have to explicitly apply the width to an inner block level element, if it's supposed to stretch inside its container element.

I'd recommend you to check http://bonrouge.com/2c-hf-fluid.php, to see how to make a good 2 column fluid layout (you may set a width:80%; to the #wrap in that layout).

noneforit
05-28-2009, 03:31 PM
Thanks for the quick reply

So If i just put Width: auto; to the header and inner div tags then it should centre in firefox?

Thanks

_Aerospace_Eng_
05-28-2009, 04:27 PM
Just get rid of the widths. 950px can sometimes be wider than 80% which was the width in your #wrapper. Also I wouldn't set heights on #inner, or #wrapper. If you add overflow:hidden; to the CSS #inner your background image will adjust to the height of the content just in case the content gets larger you won't have to keep setting widths.

_Aerospace_Eng_
05-28-2009, 10:25 PM
Hi ,

Try to use <center> , </center> !!

Umm..no do not use the center element. Its been deprecated for a while.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum