This plunkr shows the issue.
http://plnkr.co/edit/Zr4ncVcNa53Sawbk42kK?p=preview
I'd like the blue div
s to precisely cover up the red div
s.
How do I do this?
The yellow div
s cannot be hardcoded in terms of height because their content is variable.
I can't use overflow else the SVG will also overflow, cutting off my chart.
If restructuring the HTML is required (add, remove or moving elements), I can't do it at or above the container
class (as I use an HTML partial system and this HTML is generated via nested partials).
I'd like it purely done in the container
, variable
and fill-vertically
CSS classes.
HTML
<li class="fixed left">
<view-widget>
<view-gadget>
<div class="container">
<div class="variable">
Title
<br>
Subtitle
<br>
Something else
</div>
<div class="fill-vertically">
SVG Kendo Chart
</div>
</div>
</view-gadget>
</view-widget>
</li>
<li class="fixed right">
<view-widget>
<view-gadget>
<div class="container">
<div class="variable">
Title
</div>
<div class="fill-vertically">
SVG Kendo Chart
</div>
</div>
</view-gadget>
</view-widget>
</li>
CSS
.container {
background:green;
}
.variable {
background: yellow;
}
.fill-vertically {
background: blue;
color: white;
}
.fixed {
background: red;
list-style: none;
height: 150px;
width: 45%;
}
.left {
position: absolute;
left: 0;
}
.right {
position: absolute;
right: 0;
}