Skip to content

Instantly share code, notes, and snippets.

@Trindaz
Created April 10, 2013 03:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Trindaz/5351634 to your computer and use it in GitHub Desktop.
Save Trindaz/5351634 to your computer and use it in GitHub Desktop.
How do I make these two divs line up in the center?
<html>
<head>
<title>Side By Side Div Example</title>
<style>
div.left-column {
background-color: yellow;
display: inline;
}
div.right-column {
background-color: red;
display: inline;
}
div.column {
width: 20%;
min-width: 200px;
padding: 100px;
float: left;
}
div.column-container {
}
</style>
</head>
<body>
<div class="column-container">
<div class="left-column column">Left column</div>
<div class="right-column column">Right Column</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment