我在左侧有一个日历,在右侧有一个侧栏:
问题是,案件泛滥。相反,当滚动条比其父级长时,我需要显示滚动条。
他们在引导手风琴中。
这是html:
<div id="cal-container">
<div id="cal-side">
<div class="accordion" id="accordion2">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle project-header" data-toggle="collapse" data-parent="#accordion2" href="#project-list">Projects
</a>
</div>
<div id="project-list" class="accordion-body collapse">
<div class="accordion-inner">
<div class="event-container project-container">
</div>
</div>
</div>
</div>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle task-header" data-toggle="collapse" data-parent="#accordion2" href="#task-list">Tasks
</a>
</div>
<div id="task-list" class="accordion-body collapse">
<div class="accordion-inner">
<div class="event-container task-container">
</div>
</div>
</div>
</div>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle case-header" data-toggle="collapse" data-parent="#accordion2" href="#case-list">Cases
</a>
</div>
<div id="case-list" class="accordion-body collapse">
<div class="accordion-inner">
<div class="event-container case-container">
</div>
</div>
</div>
</div>
</div>
</div>
<div id="cal">
<div id='calendar'>
</div>
</div>
</div>
事件进入事件容器。
这是CSS:
#cal-side
{
float:right;
height:100%;
width:200px;
margin:50px 5px 5px 5px;
}
#cal-container
{
width:100%;
}
.accordion-inner
{
padding:2px 2px !important;
}
.external-event { /* try to mimick the look of a real event */
margin: 2px;
padding-left:4px;
color: #ffffff;
background-color:blue;
font-size: .85em;
cursor: pointer;
-webkit-border-radius: 3px;
border-radius: 3px;
height: 20px;
overflow:hidden;
}
.event-container
{
margin:1px;
}
#cal{
}
这是一些生成的html:
我尝试了几种类型的溢出:自动。唯一“有效”的是将事件容器最大高度设置为固定像素数量。然后我看到一个案例滚动条,但除此之外,它会执行您所看到的操作。我需要最大高度是 cal-side 的高度或其他东西......
我不知道该怎么办。
谢谢