Reputation: 39
I want to have divs (.ra) whose content is:
As one can have many of these .box divs, we need a scroll. The scroll leaves the header fixed.
It seems to be Ok, BUT I have a large empty space at the bottom of the scroll. I don't understand why.
Full code : https://jsfiddle.net/yannn/n4dk2znh/1/
HTML :
<div class="ra">
<div class="header">
<div class="ra_name">Martin, John William Harry Slobodan Junior</div>
</div>
<div class="rcs" id="ra1_rcs">
<div class="box">titre</div>
<div class="box">titre</div>
...
<div class="box">titre</div>
<div class="box">titre</div>
<div class="box">titre</div>
</div>
</div>
CSS :
.ra {
width: 28%;
height: 200px;
float: left;
border-style: solid;
margin-left: 1%;
overflow: auto;
}
.header {
background-color: white;
color: black;
height: 50px;
width: 26%;
position: absolute;
}
.rcs {
margin-top: 50px;
margin-bottom: : -50px;
height: 150px;
}
.box {
width: 60px;
height: 40px;
float: left;
background-color: black;
border-radius: 3px;
font-size:80%;
color: white;
margin: 1px;
padding: 1px;
text-align: left;
text-overflow: ellipsis;
}
Upvotes: 0
Views: 100