Opera and margin question

  • Thread starter some dude somewhere
  • Start date
S

some dude somewhere

Hi there,

I created a website with in de body tag ...style="margin:0px" .... so
everything lines up without any margins. Works ok for IE and NS (Mozilla)
but in Opera there still is a little margin, so for example a web graphic
lines out of the total layout. As you might assume: 'ANNOYING!'

Is there a solution to fix this in Opera? And if so does this solution screw
things up in IE or NS again!? Hehehe. Ah, browsers!

Thanks in advance of course!

Eric
 
A

Andrew Tang

some dude somewhere said:
I created a website with in de body tag ...style="margin:0px" .... so
everything lines up without any margins. Works ok for IE and NS (Mozilla)
but in Opera there still is a little margin, so for example a web graphic
lines out of the total layout. As you might assume: 'ANNOYING!'

On the Opera's technical document homepage, they use padding as oppose to
margin for the body tag. Just do:
style="margin:0; padding:0;"
and you will be fine. There is no need to specify units for 0, as 0 is 0 in
any units.

Here's the page
http://www.opera.com/docs/specs/
under the 'Some Differences under Internet Explorer and Netscape' section.

Andy
 
S

Steve Pugh

some dude somewhere said:
I created a website with in de body tag ...style="margin:0px" .... so
everything lines up without any margins. Works ok for IE and NS (Mozilla)
but in Opera there still is a little margin, so for example a web graphic
lines out of the total layout. As you might assume: 'ANNOYING!'

Is there a solution to fix this in Opera? And if so does this solution screw
things up in IE or NS again!? Hehehe. Ah, browsers!

Opera has zero margins on body by default, but unlike other browsers
it has non-zero padding.

When you think about it this actually makes more sense - for any other
element the background colour and/or image goes up to the outer edge
of the padding, not the outer edge of the margin.

So setting padding: 0; as well as margin: 0; will place the content
flush with the edge of the window in Opera as well without making any
difference to other browsers.

Steve
 
S

some dude somewhere

Thank YOU guys!!!!! Great news!

Eric


Steve Pugh said:
Opera has zero margins on body by default, but unlike other browsers
it has non-zero padding.

When you think about it this actually makes more sense - for any other
element the background colour and/or image goes up to the outer edge
of the padding, not the outer edge of the margin.

So setting padding: 0; as well as margin: 0; will place the content
flush with the edge of the window in Opera as well without making any
difference to other browsers.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <[email protected]> <http://steve.pugh.net/>
 
S

some dude somewhere

http://www.bambamstudio.nl/

Another problem. I tried the Opera margin repair solution (padding:0 as
well) but in Mozilla de navigation is still not right. In Opera and IE it is
ok. Wierd!

Any ideas!?

TIA

Eric
 
E

Eric Bohlman

http://www.bambamstudio.nl/

Another problem. I tried the Opera margin repair solution (padding:0
as well) but in Mozilla de navigation is still not right. In Opera and
IE it is ok. Wierd!

I don't think it's "OK" in Opera either. First, it doesn't show up at all
until all images have loaded, something that was taking a very long time
for me. Second, when it does show up, the text of the items is *tiny* and
barely contrasts with the background.

I'd lose that animated left column. It's right where people would first
look for a menu; having motion in that particular spot is very distracting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top