Shpigford Shpigford - 5 months ago 17
HTML Question

Break element out of container

I have all my content wrapped in a container element with a fixed width.

But I have a

<div>
that I want to "break out" of that container to span the full width of the page.

http://dabblet.com/gist/3207168

enter image description here

As you can see in that example, I've got the
<div>
to break out, but since it's positioned absolutely, it doesn't affect the flow of the page...which is what I'd like it to do.

I want it to act like it's in the flow of the page, but expand the full width of the window.

Answer

Maybe http://jsfiddle.net/sYv9g/1/?

.break { 
    text-align:center;
    font-weight:bold;
    background:rgba(255,0,0, 0.5);
    margin-left:-100%;
    margin-right:-100%;
}