Background image that auto resizes?

66 views
Skip to first unread message

Steph Best

unread,
Jan 9, 2013, 7:25:18 AM1/9/13
to k2-su...@googlegroups.com
I've found the Area in the CSS code that i can alter to add a background image, this is the code i'm using

/* Page Structure */

body{
    font-size: 62.5%; /* Resets 1em to 10px */
    color: #444;
    background:url('http://i49.tinypic.com/atrhnt.jpg');
    text-align: center;
    }

As it is the image is too big, so i need to add code that can make the image auto resize for different browsers or window sizes?

Steph Best

unread,
Jan 9, 2013, 8:09:55 AM1/9/13
to k2-su...@googlegroups.com
fixed it myself, my code now looks like


/* Page Structure */

body{
    font-size: 62.5%; /* Resets 1em to 10px */
    color: #444;
    background:url('http://i50.tinypic.com/357khfp.jpg');
    background-size:100% 100%;
    background-repeat:no-repeat;
    background-attachment:fixed;
    text-align: center;
    }

Please not i also added the fixed background code.
Reply all
Reply to author
Forward
0 new messages