Last Updated: February 25, 2016
·
948
· gregbenner

Full Background in CSS

Need a background to be full size and take up the entire element?
Even on resize?? Try:

-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;

Alernatively try javascript for IE fallback: https://github.com/srobbin/jquery-backstretch

1 Response
Add your response

Been using "background-size: cover;" for a couple of projects lately, and it rocks. Didn't know about the nifty IE fallback though, thanks for sharing.

over 1 year ago ·