force width 100% into container

section width should be force 100% from left and right to window into container.

<div class="container"><article class="text">
<h4 id="contact">Contact Us</h4>
Customers worldwide trust us with their employees’ security training. We are confident we can take some load off you.

Please use the form below to drop us a message and one of our experts will be with you soon.

</article></div>

–JS Code

var contW = $('.contact').width();
var contWA = $('.contact .text').width();
var final = contW - contWA
$('.contact .text').css('margin-left', -final/2).css('margin-right', -final/2).css('padding-right', final/2).css('padding-left', final/2)

<div class="container">
<article class="text" style="margin-left: -466.5px; margin-right: -466.5px; padding-right: 466.5px; padding-left: 466.5px;">
<h4 id="contact">Contact Us</h4>
<p>Customers worldwide trust us with their employees’ security training. We are confident we can take some load off you.</p>
<p>Please use the form below to drop us a message and one of our experts will be with you soon.</p>
</article>
</div>

Leave a Reply

Your email address will not be published. Required fields are marked *