My div projects
needs to have an automatic height because the project
classes will be later added dynamically.
The problem is that the height: auto
attribute doesn't work.
HTML:
<div id="content">
<div id="projects">
<div id="Proj1" class="project col-md-4"></div>
<div id="Proj2" class="project col-md-4"></div>
<div id="Proj3" class="project col-md-4"></div>
</div>
<div id="lanes">
<div id="lane1" class="lane">
</div>
</div>
</div>
CSS:
#projects {
background-color: pink;
height: auto;
padding: 10px;
}
.project {
background-color: yellow;
height: 100px;
border-style: solid;
border-width: 1px;
}
.lane {
height: 155px;
background-color: green;
border-style: solid;
border-width: 1px;
}
I can not use overflow: auto
or overflow: normal
because i have draggable divs within the projects
div, which can't be dragged out.