Say, like in this example here: http://www.electrictoolbox.com/examples/wide-background-image.html
When I do it, I end up getting white borders around the image no matter what I do. What am I doing wrong?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’re hoping to use
background-image: url(...);, I don’t think you can. However, if you want to play with layering, you can do something like this:And then some CSS:
You can now layer content above the stretched image by playing with z-indexes and such. One quick note, the image can’t be contained in any other elements for the
width: 100%;to apply to the whole page.Here’s a quick demo if you can’t rely on
background-size: http://jsfiddle.net/bB3Uc/