Welcome to WebmasterWorld Guest from 54.157.222.62

Forum Moderators: open

Message Too Old, No Replies

Opera 8

   
5:52 am on May 14, 2005 (gmt 0)

10+ Year Member



Someone mentioned how 'good' Opera 8 was, so I decided to peek myself. It loads fast, has a smooth interface, but I needed to test it on CSS. So I open my evil non-hacked test page. For the most part, everything was expected. But I noticed (something I've apparently never noticed before): Opera doesn't render the body {margin: ..} selector right. For example, to have no margin, you have to apply the margin: 0; to the html tag. Now, I understand inheritance, but that's plain stupid.

I do so love Firefox :)

2:57 pm on May 14, 2005 (gmt 0)

10+ Year Member



I think that problem has been around for a while, i seem to remember designing a few websites and checking them in Opera to find I had to add the extra tags to get rid of the margin. Very strange behaviour, plays hell with validation :(
3:01 pm on May 14, 2005 (gmt 0)

10+ Year Member



Opera uses BODY's "padding" to describe the guttering around the edge of the page -- not "margin".

If you think about it it's far more sensible -- after all, the guttering takes the same colour as the BODY itself, so it can't be margin!

4:07 pm on May 14, 2005 (gmt 0)

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



As tobyink has rightly said:

body {
margin:0; /* for Mozilla/Firefox, Safari/Konqueror and IE */
padding:0; /* for Opera */
}

Yes, Opera's implementation may be more logical but it does have the disadvantage of being inconsistent with other browsers.

7:33 pm on May 14, 2005 (gmt 0)

10+ Year Member



Actually, in Opera 8 when I tried it, I had both margin and padding specified. But when I added 'html' to the selector, it worked. /shrug

It's not a big deal, at least it's fixable. As far as margins/padding go, it's not like any browser actually renders them correctly, anyhow.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month