CSS3 PIE Forums
http://css3pie.com/forum/

background-size?
http://css3pie.com/forum/viewtopic.php?f=4&t=367
Page 1 of 1

Author:  MACscr [ Wed Jan 12, 2011 8:10 pm ]
Post subject:  background-size?

Im trying to figure out how to use css3pie to get around the lack of background-size support in IE. Im basically just trying to stretch a background vertically within a div. Any recommendations would sincerely be appreciated.

I was just using background-size:100% 100%, auto auto; but that wont work with pie from my testing. =/

Author:  jason [ Wed Jan 12, 2011 9:19 pm ]
Post subject:  Re: background-size?

Nope, PIE doesn't support background-size yet.

You might be able to use border-image with the 'fill' keyword, if you give it slice widths of 0... that should make the center piece expand to the size of the target element. Haven't tried this though, let me know if it works or not.

The only other thing I can think of doesn't involve PIE: give your container element position:relative, and add an <img> element inside it with styles like:
Code:
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
z-index:-1;

Author:  MACscr [ Thu Jan 13, 2011 2:15 am ]
Post subject:  Re: background-size?

thanks, your css method worked after a bit of trial and error. Its to bad PIE doesnt support background-size. =/

Thanks again for your help!

Author:  matthewdl [ Thu Jan 27, 2011 4:33 pm ]
Post subject:  Re: background-size?

In my humble opinion, background-size is much more valuable than border-image, considering a) border-image is confusing to understand and hard to implement, b) IE9 will not support border-image, but will support background-size, c) the other browsers support background-size more than border-image: http://www.quirksmode.org/css/background.html

The math for scaling should be simple, yes?

Thanks,
Matthew

Page 1 of 1 All times are UTC - 7 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/