James
Can css stretch a background image?
-
jamesmusic
- Regular
- Posts: 46
- Joined: Thu Jun 28, 2007 6:50 pm
- Contact:
Can css stretch a background image?
Is it possible to strech a background image so it fills the page, rather than a repeat tile...? Or is there a cunning way around this problem in css?
James
James
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Can css stretch a background image?
Hi!
There is no CSS property to stretch a background image. I wonder which graphic you could stretch to fit, which would still look okay? Usually the "key to success" is simple repeating. If you have a real image, and not a pattern, stretching it would really look nasty.
You can use the z-index property and place a <img> element with 100% width containing an image, and use absolute positioning to place it below other elements. But that's really hackish.
Apart from that, you might want to ask thsi question in a HTML/CSS specific forum, since it is little related with Serendipity.
Regards,
Garvin
There is no CSS property to stretch a background image. I wonder which graphic you could stretch to fit, which would still look okay? Usually the "key to success" is simple repeating. If you have a real image, and not a pattern, stretching it would really look nasty.
You can use the z-index property and place a <img> element with 100% width containing an image, and use absolute positioning to place it below other elements. But that's really hackish.
Apart from that, you might want to ask thsi question in a HTML/CSS specific forum, since it is little related with Serendipity.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/