Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Resize background image to browser size?


Tomtheman2 - 4:23 pm on May 29, 2012 (gmt 0)


Hi,

Please can someone help me out, I am a newbie when it comes to CSS and have been trying to learn as much as possible online.

I have a background image that I am trying to make it resize when the browser window gets smaller or bigger.

I have seen the right code online but do not know how to implement it into my own code.

This is what I have at the moment.


* { margin:0; padding:0;}
body {
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
line-height:17px;
color:#634c31;
padding:29px 0 33px 0;
background: url("../images/body-bg.jpg");
background-attachment: fixed;
background-repeat: no-repeat;
background-size:height 100% width 100%;


I have tried adding the code to this but I just cannot get it to work.

It would be much appraised if someone could help me out with this.


Thanks,

[edited by: alt131 at 9:55 pm (utc) on May 29, 2012]
[edit reason] Thread Tidy [/edit]


Thread source:: http://www.webmasterworld.com/css/4459069.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com