As a newcomer to the world of Html & CSS, I have a seemingly simple question that has been eluding me: How can you make an html element(child div, text, etc.) span across multiple divs using only CSS & Html(with no Javascript/JS)? Currently, I am working on creating a basic event calendar(using HTML+CSS) and focusing on handling multi-day events.
html, body {
left: 0;
margin: 0;
background:white;
height:100%;
}
b{
font-family:calibri;
padding-left:10px;
}
#container{
margin: 0 auto;
width:300px;
padding-top:50px;
}
.colorone{
background:#FFEB3B;
width:150px;
height: 150px;
float:left;
}
.colortwo{
width:150px;
height: 150px;
background:#8BC34A;
overflow:hidden;
}
<html>
<head></head>
<body>
<div id="container">
<div class="colorone"><b>4</b>
</div>
<div class="colortwo"><b>5</b>
</div>
</div>
</body>
</html>
Intended outcome: https://i.sstatic.net/l1Lyv.png
The blue div/rectangle should be able to extend over more than two parent divs if necessary.
I've scoured online resources and StackOverflow for answers but haven't found a satisfactory solution yet. Any assistance would be highly appreciated.