4 replies [Last post]
Merc_2k
Offline
newbie
Last seen: 17 years 30 weeks ago
Joined: 2004-07-01
Posts: 8
Points: 0

Here is my site and style sheet (which work fine in IE):

Site
Stylesheet

My problem seems to be with the margins. When I set them to 5% in IE, the container div shrinks like I want it to, but in FF the whole page appears shifted to the right, with the margin only on the left side. Also the bottom border won't render (at any size). Anyone have any idea how to fix either of these problems? Any help will be greatly appreciated.

Merc_2k

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 4 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

Problem with margins and borders in Firefox

Hi Merc_2k,
Firstly try removing the width from HTML, body.
If that has no effect try setting the margin and padding to 0 in the html , body and then wrapping another div around everything with a margin of 5%.

Hope that helps

Merc_2k
Offline
newbie
Last seen: 17 years 30 weeks ago
Joined: 2004-07-01
Posts: 8
Points: 0

Problem with margins and borders in Firefox

Still doesn't seem to want to work. I guess I'll have to play around with it. Thanks.

Stu
Stu's picture
Offline
Enthusiast
Bristol uk
Last seen: 18 years 1 week ago
Bristol uk
Joined: 2004-01-20
Posts: 282
Points: 0

Problem with margins and borders in Firefox

Remove the <?xml version="1.0" encoding="iso-8859-1"?>
This switches IE into quirks mode with the faulty box model.

Remove all references to width 100%.
If you add margins of 5% you will end up with an overall width of 110% giving left/right scrolling.

In your layout at the moment Firefox is correct.

It's not what you do it's the way that you do it.
So do it with STYLE
http://www.s7u.co.uk

Merc_2k
Offline
newbie
Last seen: 17 years 30 weeks ago
Joined: 2004-07-01
Posts: 8
Points: 0

Problem with margins and borders in Firefox

That fixed it. Thanks Tony and Stu! Laughing out loud