Despite searching for multiple solutions to this issue, I have yet to find one that works without requiring me to modify my HTML code.
Here is the current HTML in question:
<div class="name">Daiel</div>
<div class="amount">30€</div>
<!-- clear here -->
<div class="graph">
<div class="green" style="width: 42%"></div>
</div>
Accompanying this HTML is the following CSS:
div.name{float:left;}
div.amount{float:right; }
div.amount:after { content: " "; display: table; clear: both; }
div.graph { height: 26px; width: 100%; background: #d9d9d9;}
div.graph .green { height: 25px; background: #a2af00;}
My problem lies in positioning the bars below the text elements. I believe I need to use :after on .amount to automatically clear the floats.
Please refer to jsfiddle.net/qQaQg/13/ for a visual representation.
What am I missing here?
Appreciate your assistance!