html - Column divs being pulled to bottom of container -
three column layout, 3 columns taking 1/3 of page. height of 100%.
the column <div class="atweet">
's in decides height of 3 columns. others 'pulled' down height.
i want 3 columns same height, tweets being @ top. empty space @ bottom of column being filled grey (background).
i don't see why being pulled down bottom. gets super interesting when set height in .thirdcol 400px (for eg).
any ideas? i'm sure simple i'm missing it. thanks.
(using chrome + opera btw)
code in js fiddle - html:
<div id="managestockgridarea" class="maincontentgridarea"> <div id="feedstab" class="blockinputarea"> <div id="feed1" class="thirdcol"> <div class="fitler"> <select><option>op1</option><option>op2</option></select> <select><option>op1</option><option>op2</option></select> </div> <div class="streamcontainer"> <div class="atweet"> <span class="tweethandle">atpeelypeel (firstname lastname)</span> <span>lorem ipsum dolor sit amet, consectetur adipiscing elit. sed nec purus in ante pretium blandit. aliquam erat volutpat. nulla libero lectus.</span> </div> </div> </div> <div id="feed2" class="thirdcol"> <div class="fitler"> <select><option>op1</option><option>op2</option></select> <select><option>op1</option><option>op2</option></select> </div> <div class="streamcontainer"> <div class="atweet"> <span class="tweethandle">atpeelypeel (firstname lastname)</span> <span>lorem ipsum dolor sit amet, consectetur adipiscing elit. sed nec purus in ante pretium blandit. aliquam erat volutpat. nulla libero lectus.</span> </div> <div class="atweet"> <span class="tweethandle">atpeelypeel (firstname lastname)</span> <span>lorem ipsum dolor sit amet, consectetur adipiscing elit. sed nec purus in ante pretium blandit. aliquam erat volutpat. nulla libero lectus.</span> </div> </div> </div> <div id="feed3" class="thirdcol"> <div class="fitler"> <select><option>op1</option><option>op2</option></select> <select><option>op1</option><option>op2</option></select> </div> <div class="streamcontainer"> <div class="atweet"> <span class="tweethandle">atpeelypeel (firstname lastname)</span> <span>lorem ipsum dolor sit amet, consectetur adipiscing elit. sed nec purus in ante pretium blandit. aliquam erat volutpat. nulla libero lectus.</span> </div> </div> </div> </div>
css:
body,html, #managestockgridarea{height:100%; min-height: 100% !important;} .thirdcol { width:32.5%; display:inline-block; background-color:grey; height:400px; } .atweet { background-color:teal; } .tweethandle { display:block; }
modify css follows:
.thirdcol { width:32.5%; display:inline-block; background-color:grey; min-height:100%; vertical-align: top; }
by default, inline blocks vertically aligned baseline of text, corresponds baseline level of bottom-most line of each text block.
note: getting background color bit trickier...
Comments
Post a Comment