Created
February 2, 2012 19:39
-
-
Save loranger/1725323 to your computer and use it in GitHub Desktop.
Je peux pas faire mieux que ça.
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
/* | |
Je peux pas faire mieux que ça. | |
Là, ça a l'air cool mais si tu ajoutes plus de contenu à gauche qu'à droite ça part en couille. | |
À ce problème, je ne vois qu'une seule solution : Le javascript. | |
Si la hauteur de .left est supérieure à la hauteur de .container, alors $('.container').height( $('.left').height() ); | |
'fin tu vois quoi... | |
*/ | |
.container { | |
background: rgba(0, 0, 0, .1); | |
text-align: center; | |
position: relative; | |
} | |
.left, | |
.right { | |
min-height: 100%; | |
} | |
.left { | |
position: absolute; | |
background: rgba(0, 0, 255, .1); | |
width: 200px; | |
height: 100%; | |
} | |
.right { | |
background: rgba(255, 0, 0, .1); | |
margin-left: 200px; | |
} |
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="left"> | |
my left block | |
</div> | |
<div class="right"> | |
my<br /> | |
right<br /><br /><br /> | |
block | |
<p> | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | |
</p> | |
</div> | |
</div> |
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
{"view":"split-vertical","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment