#1
  1. I do NOT have crabs...
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    England
    Posts
    161
    Rep Power
    16

    CSS: background-position: right; not working in Firefox/Netscape


    The CSS background-position: right; is not working in Firefox/Netscape, and just aligns the background image to the left.

    Know why?
  2. #2
  3. No Profile Picture
    Self-banned
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Feb 2004
    Location
    http://middle.nowhere.com
    Posts
    2,258
    Rep Power
    3628
    You're missing the vertical component. To align it in the top right, use:
    Code:
    background-position: top right;
    When using this syntax, you need both attributes, starting with vertical, then horizontal.

    http://www.w3schools.com/css/pr_background-position.asp
  4. #3
  5. I do NOT have crabs...
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    England
    Posts
    161
    Rep Power
    16
    whooops!!! Forgot to quote the bit where i had 0px, found i had them in the wrong order anyway. Strangely though, I had background-position: 0px right; and it didn't work, I had to use 'top right'.

    Thanks anyways!
  6. #4
  7. No Profile Picture
    JackOfAllTrades, MasterOfNone
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Location
    Kentucky, USA
    Posts
    398
    Rep Power
    129
    Originally Posted by Crabby
    Strangely though, I had background-position: 0px right; and it didn't work
    It's a good thing, too, since that is an incorrect way to declare it.
  8. #5
  9. I do NOT have crabs...
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    England
    Posts
    161
    Rep Power
    16
    What's the point in posting that, when you're not going to even say what was wrong with it?
  10. #6
  11. Thanks Johnny Hart (BC) R.I.P.

    Join Date
    May 2003
    Location
    Dallas
    Posts
    5,262
    Rep Power
    1960
    You may use numerical values, percentage or length units. Numerical values may be mixed or matched. In lieu of numeric values, you may use constants taken from two groups of values. Select one from each set of top|center|bottom, or left|center|right.

    You may not mix numeric values and constants. There are special rules concerning the use of single values. More detail is available at W3.

    cheers,

    gary
    Last edited by kk5st; July 28th, 2004 at 02:32 PM.
    There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

    My html and css workshop, demos and tutorials.
    Ask a better question, get a better answer.

IMN logo majestic logo threadwatch logo seochat tools logo