I am trying to have a nice fluid 2 column layout (link below). I’m having a couple of issues!
1) I want my tab-wrapper to extend the entire height of the page at all times (not sure why it’s not working)
2) I want my “main” div to fit snug against the tab wrapper and also extend the entire height of the page, but also fill the rest of the space to the right.
Any help would be greatly appreciated. I’m sure it’s something silly that I have missed.
CSS
body{
font-family: Calibri, sans-serif;
top:0px;
left:0px;
margin:0px;
padding:0px;
}
#page{
position: relative;
width:100%;
height:100%;
}
.tab{
min-height:75px;
padding:5px;
border-bottom: 1px solid #2a2a2a;
text-align: center;
color: #717171;
cursor: pointer;
line-height:75px;
}
.no-icon{
line-height: 75px;
}
.active{
background-color: #3c3c3c;
color: #ffffff;
}
#tab-wrapper{
display:inline-block;
height:100%;
width:10%;
border: 1px solid black;
float: left;
background-color: #464646;
}
#main{
display:inline-block;
width:80%;
height:100%;
background-color: #dbdbdb;
padding:30px 20px;
}
#footer{
clear:both;
width:100%;
border:1px solid black;
}
HTML
<div id="page">
<div id="tab-wrapper">
<div id="tab1" class="tab active">
Tab 1
</div>
<div id="tab2" class="tab">
Tab 2
</div>
<div id="tab3" class="tab">
Tab 3
</div>
</div>
<div id="main">
Lorem ipsum etc
</div>
</div>
First to make element 100% height you have to apply 100% to body and html.
I think you might achieve what you need with positioning. I’ve done something similar to one project and it works in every single browser. I’ve done this very quick but it should give you the idea:
Demo here: http://jsfiddle.net/c4Tn7/
HTML
CSS