Forums
View unanswered posts | View active topics It is currently Fri Oct 31, 2014 11:21 pm



Reply to topic  [ 4 posts ] 
 background-size? 
Author Message

Joined: Wed Jan 12, 2011 8:07 pm
Posts: 2
Post 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. =/


Wed Jan 12, 2011 8:10 pm
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1446
Post 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;


Wed Jan 12, 2011 9:19 pm
Profile

Joined: Wed Jan 12, 2011 8:07 pm
Posts: 2
Post 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!


Thu Jan 13, 2011 2:15 am
Profile

Joined: Thu Jul 15, 2010 1:56 pm
Posts: 34
Post 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


Thu Jan 27, 2011 4:33 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.