Sunday, February 22, 2009

Creating Background Through CSS

Hello Guys, I recently came across this css code to have the background image resized through CSS. Before CSS3 it was really not possible to re-size the background image and designers had to do the resizing using some graphics tool. Now no more graphics tool needed. Let get to the coding to lear.


.backgroundsize {
background: url(http://www.pixeldim.com/images/logo.jpg);
-webkit-background-size: 137px 50px;
-khtml-background-size: 137px 50px;
-o-background-size: 137px 50px;
background-size: 137px 50px;
background-repeat: no-repeat;
padding: 60px 5px 5px 10px;
border: 3px solid #ddccb5;
}

Use this code to re-size your background images. Hope this will help you guys.

Friday, February 20, 2009