Shaolin
07-09-2008, 02:49 PM
Hi Guys,
I have a div which grows and shrinks as content is changing. I want the menu div to be 100% height within the max limit of the div its nested in (i.e. manageCreditContent div), but when I set the property to 100% the menu length goes outside the manageCreditContent div to the bottom of the browser. See code below:
<head>
<style>
#contentPanelTop {
width: 100%;
height : 100%;
background-color : #FFF;
display : inline-table;
margin : 0 0 0 0;
}
#tabContent {
height : 250px;
padding : 20px;
font-family : verdana, arial, san-sarif;
font-weight : lighter;
line-height : 1.8em;
height : 100%;
}
#manageCreditContent {
width: 100%;
height : 100%;
}
#manageCreditContent #menu {
width : 177px;
height : 100%;
float : left;
position : absolute;
background-color : #EEE;
}
</style>
</head>
<div id="contentPanelTop">
<div id="tabContent">
<div id="manageCreditContent">
<div id="menu">
<ul>
<li><a href="#ManageCredit" onClick="loadManageCreditContent('ManageCredit')">Home</a></li>
<li><a href="#AddCredit" onClick="loadManageCreditContent('content_manage_credit')">Add Credit</a></li>
</ul>
</div>
</div>
</div>
</div>
I have a div which grows and shrinks as content is changing. I want the menu div to be 100% height within the max limit of the div its nested in (i.e. manageCreditContent div), but when I set the property to 100% the menu length goes outside the manageCreditContent div to the bottom of the browser. See code below:
<head>
<style>
#contentPanelTop {
width: 100%;
height : 100%;
background-color : #FFF;
display : inline-table;
margin : 0 0 0 0;
}
#tabContent {
height : 250px;
padding : 20px;
font-family : verdana, arial, san-sarif;
font-weight : lighter;
line-height : 1.8em;
height : 100%;
}
#manageCreditContent {
width: 100%;
height : 100%;
}
#manageCreditContent #menu {
width : 177px;
height : 100%;
float : left;
position : absolute;
background-color : #EEE;
}
</style>
</head>
<div id="contentPanelTop">
<div id="tabContent">
<div id="manageCreditContent">
<div id="menu">
<ul>
<li><a href="#ManageCredit" onClick="loadManageCreditContent('ManageCredit')">Home</a></li>
<li><a href="#AddCredit" onClick="loadManageCreditContent('content_manage_credit')">Add Credit</a></li>
</ul>
</div>
</div>
</div>
</div>