Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Full with element in middle of page
// Make an element in the page go full width
// Author: Bill Erickson
// URL:
function explodeWidth() {
var browserWidth = $(document).width();
var wrapWidth = $('.site-inner .wrap').width();
var margin = ( ( browserWidth - wrapWidth ) / 2 );
$('.explode-width').css( 'margin-left', - margin ).css( 'margin-right', - margin );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment