<!DOCTYPE html> <html> <head> <script> function boom() { document.documentElement.offsetHeight; document.getElementById('e').setAttribute('style', ''); document.documentElement.offsetHeight; } </script> <style id="e"> body #a::after { content: "before text"; position: fixed; } </style> </head> <body onload="boom();" style="-moz-column-count: 2; width: 100px;"> <div>m</div> <div id="a" style="-moz-column-count: 2;"> m <br style="float: left;"> m <span style="float: left;">m</span> <div style="float: left; -moz-column-width: 9999999999px;"></div> </div> </body> </html>