<!DOCTYPE html> | |
<style> | |
#dynamic-container { | |
width: 500px; | |
transform: translateX(0); | |
} | |
#percentage-padding { | |
position: absolute; | |
padding: 10%; | |
} | |
</style> | |
<div id='dynamic-container'> | |
<div id='percentage-padding'> | |
There should be no line break. | |
</div> | |
</div> | |
<script> | |
document.body.offsetTop; | |
document.getElementById('dynamic-container').style.transform = "none"; | |
</script> |