This question seems to have been answered a million times, and it seems to work a million times too. Not for me though. I would like to push together all the divs in
.mainprogress {
height: 60px;
border: 2px solid black;
}
.mainprogress div {
padding: 0;
margin: 0;
display: inline-block;
}
.detailprogress div {
height: 100%;
}
.detailprogress .done {
background-color: lightgreen;
}
.detailprogress .donelate {
background-color: lightpink;
}
.detailprogress .late {
background-color: red;
}
.detailprogress .todo {
background-color: green
}
<body>
<div class="mainprogress">
<div class="detailprogress" style="height:100%;width:18%">
<div class="done" style="width:58%"></div>
<div class="late" style="width:41%"></div>
</div>
<div class="detailprogress" style="height:35%;width:81%">
<div class="done" style="width:73%"></div>
<div class="todo" style="width:26%"></div>
</div>
</div>
</body>
when fiddling enough with negative margins, it seems to start working at some point, but it feels terribly hackish. How do I get the elements to align to each other?