I know in JS there is screen.width but I'm wondering if I can do this with pure CSS...
<style>
.screen {width:100%; height: 100%;}
.red {background: pink; float: left;}
.blue {background: lightblue; float: left;}
.green {background: lightgreen; float: left;}
.row {height: 100%; clear:both;}
body {margin: 0;}
</style>
<body>
<div class="row">
<div class="screen red">foo</div>
<div class="screen blue">foo</div>
<div class="screen green">foo</div>
</div>
<div class="row">
<div class="screen red">foo</div>
<div class="screen blue">foo</div>
<div class="screen green">foo</div>
</div>
</body>
What I want is:
Each .screen is the size of my browser viewport, and I have two rows of three .screens each. So I can scroll horizontally 3X the width of my viewport and I can scroll vertically 2X the height of my viewport.
What I get with this code is: All the DIVs are sized to my viewport, but are just stacked vertically.