heloonsplace Posted August 5, 2009 Report Share Posted August 5, 2009 i'm struggling with fitting background images to the page. is there a way of shrinking/stretching an image to fit the size of the whole page?thanks, helen Link to comment Share on other sites More sharing options...
Ingolme Posted August 5, 2009 Report Share Posted August 5, 2009 i'm struggling with fitting background images to the page. is there a way of shrinking/stretching an image to fit the size of the whole page?thanks, helenJust assign its width to 100%:<img width="100%" ...> Link to comment Share on other sites More sharing options...
heloonsplace Posted August 5, 2009 Author Report Share Posted August 5, 2009 Just assign its width to 100%:<img width="100%" ...> cheers dude. in the css it would be {background:url('images/music.jpg') width=100%} ?? Link to comment Share on other sites More sharing options...
Ingolme Posted August 5, 2009 Report Share Posted August 5, 2009 cheers dude. in the css it would be {background:url('images/music.jpg') width=100%} ??No, you can't change the size of a background image. You'll have to make an image, and if you want it behind, use position: absolute, and then assign a negative z-index to the image. Link to comment Share on other sites More sharing options...
heloonsplace Posted August 5, 2009 Author Report Share Posted August 5, 2009 No, you can't change the size of a background image. You'll have to make an image, and if you want it behind, use position: absolute, and then assign a negative z-index to the image.thanks Link to comment Share on other sites More sharing options...
bigsilk Posted August 5, 2009 Report Share Posted August 5, 2009 I used the z-index to make a .png img of people sitting on a bench seem like they were in front of a set of paintings, as if they were looking at them. Just preserve transparency from your image editor (I use Photoshop) and apply a z-index of 1 (or 1000, it doesn't matter).And .png images are really small, too. Good practice to use them. 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