Created
March 24, 2014 20:47
-
-
Save CarlosLCervantes/9748816 to your computer and use it in GitHub Desktop.
2 Column Floating Div Height Fix JS
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
var setColumns = function() { | |
if ($("div.two-col").length > 0) { | |
var columns = $("div.two-col > div"); | |
var leftCol = columns.first(); | |
var rightCol = columns.last(); | |
var padding = parseInt(rightCol.css("padding-top").replace("px", "")) + parseInt(rightCol.css("padding-bottom").replace("px", "")); | |
rightCol.height(leftCol.height() - padding); | |
} | |
} |
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="row two-col"> | |
<div class="col-xs-6"> | |
Mah stuff on the left | |
</div> | |
<div class="col-xs-6 contrast-box"> | |
From the front door turn right. The lockbox is attached to the water faucet at the corner of the house. This text needs to be limited otherwise the display breaks. Maybe it can turn into a modal. | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment