vvvlad42
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:bot tom;" property which does this.
How can I fix this in firefox (by default it shows the top 30px)
Thanks in advace
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:bot
How can I fix this in firefox (by default it shows the top 30px)
Thanks in advace
ASKER
hi,
with your solution it is not working in Firefox and IE!!!
with your solution it is not working in Firefox and IE!!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>No, sorry, this works for me:
"No, sorry" was aimed at my first post, not at your reply ;)
"No, sorry" was aimed at my first post, not at your reply ;)
ASKER
Thank you :)
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
http://www.aptana.com/reference/html/api/CSS.field.background-position-x.html
background-attachment: fixed;
to your div's css.