We help IT Professionals succeed at work.

CSS background positioning in firefox

vvvlad42
vvvlad42 asked
on
1,020 Views
Last Modified: 2012-05-05
Hello Experts,
This is a question in CSS.

I have an image with dimensions (width:30px, height: 50px) and I would like to put it as a background for a div with dimensions (width:30px, height: 30px).
I would like to show only the bottom part of the image (20 top px will not be shown).

In IE there is "background-position-y:bottom;" property which does this.
How can I fix this in firefox (by default it shows the top 30px)

Thanks in advace
 
Comment
Watch Question

Top Expert 2007

Commented:
Hi, just a guess: try to also add

    background-attachment: fixed;

to your div's css.

Author

Commented:
hi,
with your solution it is not working in Firefox and IE!!!
Top Expert 2007
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Top Expert 2007

Commented:
>No, sorry, this works for me:

"No, sorry"  was aimed at my first post, not at your reply ;)

Author

Commented:
Thank you :)
Top Expert 2007

Commented:
FF simply doesn't support "background-position-x" and  "background-position-y", see e.g.
http://www.aptana.com/reference/html/api/CSS.field.background-position-x.html
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.