D-Z-ST Posted May 21, 2006 Share Posted May 21, 2006 Can you stretch a background across the user's browser?If so, how would you accomplish this? Link to comment Share on other sites More sharing options...
snowboard01 Posted May 21, 2006 Share Posted May 21, 2006 do us all a favor and read http://www.w3schools.com/css/css_background.asp Link to comment Share on other sites More sharing options...
D-Z-ST Posted May 21, 2006 Author Share Posted May 21, 2006 I looked there but I couldn't find it. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 21, 2006 Share Posted May 21, 2006 You cannot stretch a background, but you can make an extra-large background. If you make an image that's, say, 1600 pixels wide, you can set it as the background and have it centered. That way, if the user has a resolution that is 800 pixels wide, he only sees the center 800 pixels, but if he has 1600 pixels wide then it will show the whole thing. <body style="background-image: url('background.jpg'); background-repeat: no-repeat; background-attachment: fixed; background-position: center center;"> Link to comment Share on other sites More sharing options...
scott100 Posted May 21, 2006 Share Posted May 21, 2006 It is possible to stretch a backround image and it's not in the tutorials at w3schools so that's why you wouldn't have found it.http://www.cssplay.co.uk/layouts/background.htmlResize the window and see the image reduce/enlarge itself Link to comment Share on other sites More sharing options...
justsomeguy Posted May 22, 2006 Share Posted May 22, 2006 A lot of people reference that page. That's not a "background image", all that is is a div floating at the bottom level. That's not an image referenced by a background-image property, it's just a normal <img> tag. Link to comment Share on other sites More sharing options...
Jonas Posted May 22, 2006 Share Posted May 22, 2006 Still, in all practicality, it's a stretched background image, and the only way to do so as of now. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now