CSS Margins in Opera

Discussion in 'HTML' started by Joe, Feb 4, 2004.

  1. Joe

    Joe Guest

    Whenever I view my Website in the Opera browser, it seems to ignore my
    margins, which seem to work fine in Internet Explorer. Below I have included
    what I have put in the head of the page:

    <style type="text/css">
    BODY
    {
    scrollbar-base-color: #9A0000;
    scrollbar-arrow-color: white;
    scrollbar-DarkShadow-Color: black;
    margin-top: 0;
    padding-top: 0;
    }
    <!--
    A:link { text-decoration: none; color:"#FFFFFF" }
    A:visited { text-decoration: none; color:"#FFFFFF" }
    A:hover { text-decoration: underline overline; cursor: hand; color:"Red" }
    -->
    h1 {font-family: Arial; color: #FFCC33; font-size: 13pt; }
    </style>

    Does Opera not support CSS margins or am I doing something wrong?
    Thanks, Joe
    Joe, Feb 4, 2004
    #1
    1. Advertising

  2. Joe

    Steve Pugh Guest

    "Joe" <> wrote:

    >Whenever I view my Website in the Opera browser,


    Which version?

    > it seems to ignore my
    >margins, which seem to work fine in Internet Explorer.


    Have you tried in Mozilla?

    > Below I have included
    >what I have put in the head of the page:
    >
    ><style type="text/css">
    >BODY
    >{
    >scrollbar-base-color: #9A0000;
    >scrollbar-arrow-color: white;
    >scrollbar-DarkShadow-Color: black;
    >margin-top: 0;


    This is the only margin in the code here. By default the margin on
    body in Opera is 0 (the padding is 8px by default) so this has no
    effect.

    >padding-top: 0;


    This works. But Opera handles the collapsing of margins differently
    (i.e. properly) there may be other factors at play. A URL would help.

    >}
    ><!--


    Why start an HTML comment in the middle of a block of CSS?

    >A:link { text-decoration: none; color:"#FFFFFF" }
    >A:visited { text-decoration: none; color:"#FFFFFF" }
    >A:hover { text-decoration: underline overline; cursor: hand; color:"Red" }


    No need at all for those quotes.

    >-->
    >h1 {font-family: Arial; color: #FFCC33; font-size: 13pt; }


    Is this a print stylesheet? Points make sense for print, but on the
    screen.

    Steve

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

    Steve Pugh <> <http://steve.pugh.net/>
    Steve Pugh, Feb 4, 2004
    #2
    1. Advertising

  3. Joe wrote:

    > BODY
    > {
    > scrollbar-base-color: #9A0000;
    > scrollbar-arrow-color: white;
    > scrollbar-DarkShadow-Color: black;
    > margin-top: 0;
    > padding-top: 0;
    > }


    Have you tried also setting:

    html { margin-top: 0; padding-top: 0; }

    ?

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, Feb 4, 2004
    #3
  4. Joe wrote:
    > Whenever I view my Website in the Opera browser, it seems to ignore my
    > margins, which seem to work fine in Internet Explorer.


    Opera applies padding to body instead of margin.
    Leif K-Brooks, Feb 4, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew Crowe
    Replies:
    3
    Views:
    773
    Andrew Crowe
    Dec 13, 2003
  2. Replies:
    8
    Views:
    348
    Damien Sawyer
    Mar 11, 2006
  3. Nik Coughlin

    Opera mirror margins bug

    Nik Coughlin, May 9, 2006, in forum: HTML
    Replies:
    7
    Views:
    572
    Nik Coughlin
    May 10, 2006
  4. Bob
    Replies:
    24
    Views:
    1,519
  5. Christoph

    CSS and body margins

    Christoph, Sep 5, 2006, in forum: HTML
    Replies:
    14
    Views:
    724
    Christoph
    Sep 14, 2006
Loading...

Share This Page