/ Published in: HTML
A four square layout design that can be resized and inserted into any larger wrapper.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="square.css" type="text/css" media="screen" /> <style> body { width: 660px; background: #252525; display: block; margin: 10px auto; } #foursquare { background: #F0F0F0; width: 640px; height: auto; margin: auto; padding: 1px; display: block; position: absolute; border-radius: 15px; } #topleft { background: #747171; width: 300px; height: 300px; margin: 10px; display: block; float: left; border-radius: 15px; } #topright { background: #747171; width: 300px; height: 300px; margin: 10px; display: block; float: left; border-radius: 15px; } #bottomleft { background: #747171; width: 300px; height: 300px; margin: 10px; display: block; float: left; clear: left; border-radius: 15px; } #bottomright { background: #747171; width: 300px; height: 300px; margin: 10px; display: block; float: left; border-radius: 15px; } </style> </head> <body> <div id="foursquare"> <div id="topleft"> </div> <div id="topright"> </div> <div id="bottomleft"> </div> <div id="bottomright"> </div> </div> </body> </html>