Last active
August 29, 2015 14:02
-
-
Save ellenbo/0e48977df17d7cc93c4a to your computer and use it in GitHub Desktop.
2 column div layout: right column with fixed width, left fluid
This file contains 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
.container { | |
height: auto; | |
overflow: hidden; | |
} | |
.right { | |
width: 180px; | |
float: right; | |
background: #aafed6; | |
} | |
.left { | |
float: none; /* not needed, just for clarification */ | |
background: #e8f6fe; | |
/* the next props are meant to keep this block independent from the other floated one */ | |
width: auto; | |
overflow: hidden; | |
} |
This file contains 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
Description: | |
How to create a two column div layout where one column is a fixed width and the other is responsive. | |
Source: | |
Stackoverflow | |
http://stackoverflow.com/questions/5195836/2-column-div-layout-right-column-with-fixed-width-left-fluid |
This file contains 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
<div class="container"> | |
<div class="right"> | |
right content fixed width | |
</div> | |
<div class="left"> | |
left content flexible width | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment