Avatar of vvvlad42
vvvlad42
Flag for Israel asked on

CSS background positioning in firefox

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
 
CSSHTML

Avatar of undefined
Last Comment
TName

8/22/2022 - Mon
TName

Hi, just a guess: try to also add

    background-attachment: fixed;

to your div's css.
vvvlad42

ASKER
hi,
with your solution it is not working in Firefox and IE!!!
ASKER CERTIFIED SOLUTION
TName

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
TName

>No, sorry, this works for me:

"No, sorry"  was aimed at my first post, not at your reply ;)
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
vvvlad42

ASKER
Thank you :)
TName

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