Answer the question
In order to leave comments, you need to log in
How to stretch the menu accordion to the desired height?
I'm using Bootstrap and this menu works fine - however the parent element is content-stretched and the accordion itself has the default bootstrap height. And I need it to align with the left block and behave proportionally with it when resized. I beg you, please help me to implement this, I have no thoughts with everything. I attached
a diagram of what is needed in the picture
. Here is the code -
col-xs-3 leftcontainer, this is the left container, and col-xs-9 completaccourdion, this is the right one.
<div class="col-xs-3 leftcontainer">
<div class="row">
<div class="contheader">Текст</div>
<div class="imgcontleftcont">
<div class="imgcontleftcont"><img src="images/logo.jpg"></div>
<div class="dividerleftcont"></div>
<div class="imgcontleftcont"><img src="images/logo.png"></div>
<div class="dividerleftcont"></div>
<div class="imgcontleftcont"><img src="images/logo.jpg"></div>
</div>
</div>
</div>
<div class="col-xs-9 completaccourdion">
<div class="row">
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<div class="contheader accodrion">Текст</div>
<div class="panel panel-default useraacord">
<div class="panel-heading useraccpanel" role="tab" id="headingOne">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
Текст
</a>
</h4>
</div>
<div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
<div class="panel-body">
Текст
<div class="accordbottomint">
<div class="slidebutton">Подробнее</div>
<div class="accordphotos"><img src="images/accordphoto.jpg"></div>
</div>
</div>
</div>
</div>
<div class="panel panel-default useraacord">
<div class="panel-heading useraccpanel" role="tab" id="headingTwo">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="true" aria-controls="collapseTwo">
Текст
</a>
</h4>
</div>
<div id="collapseTwo" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingTwo">
<div class="panel-body">
Текст
<div class="accordbottomint">
<div class="slidebutton">Подробнее</div>
<div class="accordphotos"><img src="images/accordphoto.jpg"></div>
</div>
</div>
</div>
</div>
<div class="panel panel-default useraacord">
<div class="panel-heading useraccpanel" role="tab" id="headingThree">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="true" aria-controls="collapseThree">
Текст
</a>
</h4>
</div>
<div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
<div class="panel-body">
Текст
<div class="accordbottomint">
<div class="slidebutton">Подробнее</div>
<div class="accordphotos"><img src="images/accordphoto.jpg"></div>
</div>
</div>
</div>
</div>
<div class="panel panel-default useraacord">
<div class="panel-heading useraccpanel" role="tab" id="headingFour">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseFour" aria-expanded="true" aria-controls="collapseFour">
Текст
</a>
</h4>
</div>
<div id="collapseFour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFour">
<div class="panel-body">
Текст
<div class="accordbottomint">
<div class="slidebutton">Подробнее</div>
<div class="accordphotos"><img src="images/accordphoto.jpg"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
.completaccourdion {
min-height: 300px;
}
add a class to the parent element that will contain display: table, and to its children - to these columns, add a class that will contain display: table-cell.
very simple)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question