I have a header background that I would like to bleed indefinitely on the x axis. So regardless of the size of someones monitor, the grey background would extend.
How do I do this?
Thanks!
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.
Two answers, depending on what issue you’re exactly facing.
First case:
The background isn’t repeating at all
Assuming you’re using a CSS
background-imageto render your background, usebackground-repeat: repeat-x;Little demo: little link.
If you’re not using a
background-imageto render your background, then you should consider using it. There’s no direct way of making an<img>repeat.Second case:
The background is repeating, it’s just not spanning the whole width
You need to make sure your
headerhaswidth: 100%;. If you have some padding to yourheaders parent, usedisplay: block;instead ofwidth: 100%;, otherwise it’ll overflow.