Welcome to WebmasterWorld Guest from 54.198.90.50

Forum Moderators: open

Message Too Old, No Replies

10px border showing in Opera?

why?

     
8:26 pm on May 3, 2004 (gmt 0)

Full Member from GB 

10+ Year Member

joined:May 20, 2003
posts:272
votes: 0


I have just started building a site and so far I have 1 page with 2 tables on it. I have both tables set at 100% width and page borders and margins set to 0. It renders fine in IE (well it would wouldn't it!) and Mozilla, but in Opera it shows about a 10px margin all the way round the tables? And as I have the content of the tables constructed at 780px (expandable), that could cause a problem for 800x600 users. I can't recall seeing that effect before, and I have other sites with pages like this. Does anyone have any idea to what's going on?
Smokey
8:29 pm on May 3, 2004 (gmt 0)

Senior Member from CA 

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 31, 2003
posts:9068
votes: 4


For Opera, you have to set the padding to zero rather than the margin - you can argue about who is right (padding is more logical, but IE uses margin instead), but the simple answer is to put this in your CSS:

body { 
margin:0;
padding:0;
}
9:59 pm on May 3, 2004 (gmt 0)

Full Member from GB 

10+ Year Member

joined:May 20, 2003
posts:272
votes: 0


Thanks encyclo, that fixed it in a jiffy. Something else that confuses me is: if I set a table height to 100% IE expands the table to fit the page. But all the other browsers seem to ignore that setting and snaps the table to the size of its content? In reality that doesn't really matter as I have never made a page that wasn't long enough to fill any screen at least once (don't actually know if that's true for 1600 users), but I would like to know why. Am I missing something? Is there an easy fix for this too?
Thanks
5:56 am on May 4, 2004 (gmt 0)

New User

10+ Year Member

joined:June 1, 2003
posts:37
votes: 0


height is not a valid attribute for the table tag:

[w3.org...]