 <p>First thought:</p> <p>Shouldn't you be using ".each" for your function call:</p> <pre><code>$(".game").load(compose(".game", "yellow")); </code></pre> <p>since there are multiple elements with the "game" class? Just a thought. Also, attaching your function to the loading of the element seems like a potential issue, because what you're after is the width of the <em>window</em>, not the width of the element. The element will load before the whole window has loaded. Try it with window.onload instead. (You're going to get a flash of unstyled content, but that's a separate issue.)</p> <p>But there are also other connected problems: load the page at 1300px wide, then stretch it wider to 1500 and you'll see a similar error on the right side in both Webkit and FF10. There are other weird bugs down below, also on the "noticias" div. The issue is probably a bug with the onresize event, which jquery has (mostly) normalized, but nobody's perfect.</p> <p>Hombre, this is a LOT of work to get around a template limitation. I think you're arguably off on the wrong foot there in the first place, and even if you can get it to work it's obviously js-dependent, which is unnecessary. This is really a CSS issue, not a js issue. And even then, you're building the site so that it will never be responsive to narrow viewports, arguably a bad idea.</p> <p>Why not just do a pure css approach? Set the wrappers to 100% width, with no padding. Then set your asides to 100% width too, with some internal container that has a max width. Leave the WP loops the same, just wrap them in new divs that are set to center. Then set </p> <pre><code>background-size:cover </code></pre> <p>on your background images for each aside. It won't work on ancient browsers, but it'll get you a lot closer.</p> <p>OR... just set crazy wide background images (big enough to cover any realistic situation) on the body or #whitewrap? Or if that's too much to contemplate just add dummy child divs inside the various sections, that are pushed absolutely outside of each area to cover the margins. And then set the container to overflow:hidden so things don't stick out. It's ugly semantically, but more straightforward. There are a much easier ways hacks to fix this with css that don't introduce document reflow problems. You will realistically never write js that matches every single browsers css idiosyncracies!</p>