blob: bff9bc3b432067cd0ae1724b929b5d1936859b49 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body style="zoom: 1.1;">
<div id="test" style="height: 100px;">
<div id="red" style="width: 212px; height: 100px; background:red; float: left;"></div>
<div id="blue" style="height: 100px; background: blue; float: left;"></div>
</div>
<script>
var testContainer = document.getElementById('test');
var w = document.body.getBoundingClientRect().width;
w = 913;
testContainer.style.width = w + 'px';
testContainer.children[1].style.width = (w - testContainer.children[0].getBoundingClientRect().width) + 'px';
</script>
</body>
</html>