CSS: problem with background attachment

Discussion in 'HTML' started by Dimorph, Feb 24, 2004.

  1. Dimorph

    Dimorph Guest

    By standard, background attachment goes in this order: horisontal position,
    vertical position. Unfortunantly, Opera does it the other way. So when i
    put:
    background: url(title.jpg) no-repeat center 32px;

    IE puts it on top of the page, and Opera puts it on the left side of the
    page.

    Any suggestions?
    Dimorph, Feb 24, 2004
    #1
    1. Advertising

  2. Dimorph

    GD Guest

    Dimorph <> wrote:
    > By standard, background attachment goes in this order: horisontal position,
    > vertical position. Unfortunantly, Opera does it the other way.


    No it doesn't.

    > background: url(title.jpg) no-repeat center 32px;


    This is invalid CSS at the moment. The CSS spec says you cannot mix
    numeric values and keywords so change it to '50% 32px'

    As far as I know, this will be changed in the future at which point you
    can expect Opera's behaviour to follow, but the CSS1 and CSS2 specs do
    not allow it.
    GD, Feb 24, 2004
    #2
    1. Advertising

  3. Dimorph

    Steve Pugh Guest

    "Dimorph" <> wrote:

    >By standard, background attachment goes in this order: horisontal position,
    >vertical position.


    No it doesn't. Background-attachment takes a single value out of
    scroll, fixed and inherit. You're thinking of background-position.

    >Unfortunantly, Opera does it the other way.


    Not true.

    > So when i put:
    >background: url(title.jpg) no-repeat center 32px;


    My copy of Opera (7.23 on WinXp) completely ignores the whole of the
    that background property, because of the syntax errors in the CSS.

    http://www.w3.org/TR/CSS2/colors.html#propdef-background-attachment

    "Keywords cannot be combined with percentage values or length values."

    You want 50% 32px

    >IE puts it on top of the page, and Opera puts it on the left side of the
    >page.


    IE is more forgiving of bad syntax than Opera.

    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 24, 2004
    #3
    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. Fredo Vincentis

    fixed background-attachment in Netscape 7

    Fredo Vincentis, May 23, 2004, in forum: HTML
    Replies:
    8
    Views:
    592
    Fredo Vincentis
    May 24, 2004
  2. GuyBrush Treepwood
    Replies:
    4
    Views:
    13,854
    Toby Inkster
    Mar 29, 2005
  3. mason66
    Replies:
    0
    Views:
    414
    mason66
    Jul 27, 2006
  4. JWL
    Replies:
    4
    Views:
    578
    Michael Winter
    Sep 26, 2006
  5. jc
    Replies:
    3
    Views:
    1,717
Loading...

Share This Page