Created
April 10, 2013 03:45
-
-
Save Trindaz/5351634 to your computer and use it in GitHub Desktop.
How do I make these two divs line up in the center?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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