Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2 x 2 div grid using float with min-height
- <div class="boxContainer">
- <div class="box"></div>
- <div class="box"></div>
- <div class="box"></div>
- <div class="box"></div>
- </div>
- .boxContainer{
- width: 800px;
- height: auto;
- }
- .box{
- float: left;
- min-height: 150px;
- width: 400px;
- }
- <div class="boxContainer clearfix">
- <div class="box"></div>
- <div class="box"></div>
- <div class="box"></div>
- <div class="box"></div>
- </div>
- .boxContainer{
- width: 800px;
- height: auto;
- }
- .box{
- float: left;
- min-height: 150px;
- width: 400px;
- display: block;
- }
- /* I would put this at the top of the page, and minimise the newlines :) if you want to remove the "." (dot) then use this content: "