Saturday, 17 August 2013

Span image from side to side in browser window

Span image from side to side in browser window

In the middle of a webpage I want to display an image that stretches all
the way from the left to the right side of the browser window.
When the window is resized the image should scale down proportionally but
I need the height to remain the same as there is a div on the image
displaying text.
This is a good example on how it should look/work (even if the image
should be centered on the page and not at the top).
How do one accomplish this and get it working in the following browsers:
ie8+, Chrome20+, FF20?

No comments:

Post a Comment