I am faced with a CSS problem. The situation is as follow:
I have this kind of structure:
#Block {
background-color: #FF0000;
padding-top: 30px;
padding-bottom: 30px;
padding-left: 30px;
padding-right: 30px;
}
[class="Element"] {
width: 33.33%;
background-color: #0000FF;
float: left;
}
<div id="Block">
<div class="Element">
Some contents.
</div>
<div class="Element">
Some more contents.
</div>
<div class="Element">
Still some more contents.
</div>
</div>
I was expecting to see a red box behind my 3 elements(blue), containing them.
But I only see a red rectangle behind the elements, but with the wrong size, more precisely not high enough. It seems that the Block part is totally un related to the rest.
What did I do wrong?