I have a piece of HTML code as shown below
<div>
<div class="left">
</div>
<div class="center">
</div>
<div class="right">
</div>
</div>
.left
{
background: white;
border-right: 1px solid #C3C3C3;
float: left;
margin-top: 30px;
min-height: 100%;
position: absolute;
width: 170px;
}
.center
{
background: white;
float: left;
margin-left: 171px;
margin-top: 30px;
min-height: 100%;
position: absolute;
width:895px;
}
.right
{
background: #DEDFE8;
border-left: 5px solid #BDC1DE;
float: right;
margin-top: 30px;
min-height: 100%;
position: absolute;
width: 276px;
}
When the content within the center panel causes it to stretch beyond its minimum height of 100%, the left and right panels do not expand accordingly.
Is there a way to make the left and right panels expand when the center panel stretches?
Edit
If the content inside the center panel causes it to expand more than the specified minimum height of 100%, the left and right panels, which have distinct colors and borders, fail to adjust their heights accordingly. This results in gaps between them and makes the page look visually unappealing. Is there a solution to ensure that all three panels expand or contract together seamlessly?