Skip to content

Instantly share code, notes, and snippets.

@srveit
Created January 17, 2014 00:36
Show Gist options
  • Save srveit/8466298 to your computer and use it in GitHub Desktop.
Save srveit/8466298 to your computer and use it in GitHub Desktop.
CSS for 4 div fixed ratio sample. place in same directory as index.html
/* apply a natural box layout model to all elements */
*, *:before, *:after {
-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}
.parent {
background-color: #EEE;
}
.parent div {
float: left;
padding: 1em;
}
.image {
width: 20%;
background-color: #EDD;
}
.contact {
width: 40%;
background-color: #EED;
}
.access {
width: 20%;
background-color: #DDE;
}
.courses {
width: 20%;
background-color: #DED;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment