1 reply [Last post]
boristhemoggy
boristhemoggy's picture
Offline
newbie
Last seen: 7 hours 24 min ago
Timezone: GMT+1
Joined: 2005-05-24
Posts: 4
Points: 2

I have set a background image to my page, but I would like it to 'shrink' as the browser window shrinks, therefore fitting all resolutions.
I tried simply putting the image as width: 100% but this didn't work.
Is it possible and if so how please?

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 12 hours 3 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9561
Points: 3618

background-size

Since you didn't post your code or give us a link, my suggestion is made somewhat blindly, but will probably work. See CSS3 background-size property.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.