Typically with my web-pages I’ll have a #wrapper DIV that wraps the entire page and set to something like:
#wrap {position: relative; width: 1000px; display: block; margin: auto;}
My question is, if, inside that I have a banner like so:
#banner {width: 100%; display: block; height: 100px; background :#CCC;}
I then want that banner to go outside the margins of #wrapper and reach the sides of the window, no matter how big the window is.
How can I achieve this?
Here is a JS fiddle of what I can piece together: http://jsfiddle.net/MCms6/
To solve all your issues:
Make a container element for your
#banner, so it can follow the flow of your document. Also position it relative to make it the parent to your banner.Position
#bannerabsolutely and you can stretch it as wide as you want.UPDATE – DEMO
HTML
CSS