homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: DrDoc

CSS Forum

CSS: Need to background autofit to screen resolution

 1:29 pm on Aug 17, 2009 (gmt 0)

I have a background for my website, i am trying to to make a CSS code for the background auto adjust to any screen resolution. i have this on my CSS:
#background {
width: 100%;
height: 100%;
background-image: url('bg1.jpg');
background-repeat: no-repeat;
position: absolute;
left: 0px;
top: 0px;
.stretch {

and this on my HTML index file:
<body style="background-image: url('bg1.jpg'); background-color: #000000;" class="stretch" id="background">

but it dont works, anyone can help me?



 3:54 pm on Aug 17, 2009 (gmt 0)

You cannot resize background images with CSS2.1

CSS3 will have some features to do some of it but don't expect all browsers to support it yet (and that's an understatement I'm afraid, as you should not expect anything from IE, not even version 8)


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved