SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: margin problems with Opera.

  1. #1
    SitePoint Member akshay's Avatar
    Join Date
    Jul 2002
    Location
    India
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation margin problems with Opera.

    Eventhough I specify in my stylesheet to have 0px margin for the Body, Opera it still displays the default margins.

    At present I use the marginheight & marginwith (in the body tag) to get rid of the margin.

    Do you know of any other standards complaint way to get rid of the margin.

    thanks
    Want quick & complete HTML & CSS reference?
    Come to http://tagsandstyles.tk

  2. #2
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Opera (for some silly reason) believes that the W3C recommended method for setting and removing margins on a page is wrong.

    The bods at Opera thought it would be better to use:

    Code:
    body {
    padding: 0;
    }
    So basically, to cover all compliant browsers *and* Opera:

    Code:
    body {
    margin: 0;
    padding: 0;
    }
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  3. #3
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Originally posted by Bill Posters
    Opera (for some silly reason) believes that the W3C recommended method for setting and removing margins on a page is wrong.

    The bods at Opera thought it would be better to use:

    Code:
    body {
    padding: 0;
    }
    So basically, to cover all compliant browsers *and* Opera:

    Code:
    body {
    margin: 0;
    padding: 0;
    }
    If you ever want a non-indenting list, the same problem happens (cross-browser compatibility). IE and Opera use margin to indent the list, while Gecko-based browsers use padding.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •