Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Opera and margin question

Reply
Thread Tools

Opera and margin question

 
 
some dude somewhere
Guest
Posts: n/a
 
      11-20-2003
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


 
Reply With Quote
 
 
 
 
Andrew Tang
Guest
Posts: n/a
 
      11-20-2003

"some dude somewhere" <(E-Mail Removed)> wrote in message
news:OC1vb.449466$(E-Mail Removed) m...
> 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


 
Reply With Quote
 
 
 
 
Steve Pugh
Guest
Posts: n/a
 
      11-20-2003
"some dude somewhere" <(E-Mail Removed)> wrote:

>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

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

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
some dude somewhere
Guest
Posts: n/a
 
      11-20-2003
Thank YOU guys!!!!! Great news!

Eric


"Steve Pugh" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed)...
> "some dude somewhere" <(E-Mail Removed)> wrote:
>
> >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
>
> --
> "My theories appal you, my heresies outrage you,
> I never answer letters and you don't like my tie." - The Doctor
>
> Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>



 
Reply With Quote
 
some dude somewhere
Guest
Posts: n/a
 
      11-20-2003
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




"some dude somewhere" <(E-Mail Removed)> schreef in bericht
news:OC1vb.449466$(E-Mail Removed) m...
> 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
>
>



 
Reply With Quote
 
Eric Bohlman
Guest
Posts: n/a
 
      11-20-2003
"some dude somewhere" <(E-Mail Removed)> wrote in
news:bi5vb.452069$(E-Mail Removed) m:

> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to have margin-left: 10%; margin-right: 10%; only sometimes?? Cal Who ASP .Net 4 05-17-2010 12:17 PM
How to have margin-left: 10%; margin-right: 10%;" only sometimes Cal Who ASP .Net 1 05-16-2010 08:53 PM
Epson 4000 - margin to margin? nobody Digital Photography 6 03-28-2005 05:17 PM
opera and margin Linda HTML 5 01-29-2005 11:33 PM
Opera margin? chlori HTML 3 03-03-2004 08:55 AM



Advertisments