When I build a webpage and view it in different browsers it always look the same in each one (with the expected slight differences of course) until I view it in the Opera browser.
The Opera browser sets a margin (of approx. 10 pixels) all the way around the outside of the entire webpage including the bottom which can distort the page especially when using background images for tables. Of course... I hate this.
In my style sheets I always have the following code:
body style="margin:0;" ... and I've also tried,
margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;
I also include the following code in my pages for all tables:
cellspacing="0" cellpadding="0"
How can I get this outside spacing to go away?
Thanks for any feedback.
Focused Investments at Secular Bull
KIJHL Hockey - Revelstoke Grizzlies






teammatt3 posted this at 20:03—13th October 2006.
He has: 1,831 posts
Joined: Sep 2003
Have you tried doing
body {
margin:0px;
padding:0px;
}
I think Opera is adding padding to the body, so that should fix it.
My Site | Regular Expression Tester
Roo posted this at 16:31—14th October 2006.
She has: 830 posts
Joined: Apr 1999
Yes, I found I needed to add the px for Opera...just add px alongside your 0 and it should work fine.
Roo
Blog • Photolog • Galleries • KidsWeb • Baby Picasso • Web Design
NewTechGuy posted this at 18:26—16th October 2006.
He has: 57 posts
Joined: Dec 2004
Well now here's an interesting tidbit. Your suggestions worked fine... in html. However, it didn't work for php files.
Weird eh?
Any other suggestions for php?By the way, thanks a million for your suggestions, I'm going to implement then in my webpages from now on.
Focused Investments at Secular Bull
KIJHL Hockey - Revelstoke Grizzlies