 <p>Just wanted to add, the fiddle, and code from the question worked almost perfectly for me, you have to make sure you take into account any padding though when resetting width/height.</p> <pre><code>el.css({ ... width: (el.width()+LEFT_PADDING+RIGHT_PADDING)/parent.width()*100+"%", height: (el.height()+TOP_PADDING+BOTTOM_PADDING)/parent.height()*100+"%" }); </code></pre>