I am pretty much a beginner and I am trying to find out why doesn't my css work properly. The problem is that I set the background color to be green for a div with the id #zona6, but the color applies over the divs with the ids #zona2 and #zona3.
However, the background color has the same proportions as the div with the id #zona6, and, in the chrome inspect element, the div appears to be just where the color is, but the text in it is under #zona4 and #zona5, where it should be... I triple-checked the display and position of all the divs, they are all set to relative and block. Also, when I type things in the body element, the text in div #zona6 overlaps with it (this is kind of obvious becuase the div #zona6 is actually overlapping with #zona2 and #zona3).
I also tested it in Internet Explorer and I still can't find the issue, it must be simple, but I just don't get it.
#zona1 {
height: 15%;
}
#zona2 {
height: 35%;
float: left;
width: 50%;
background-color: blue;
}
#zona3 {
height: 35%;
float: right;
width: 50%;
}
#zona4 {
height: 35%;
float: left;
width: 50%;
}
#zona5 {
height: 35%;
float: right;
width: 50%;
}
#zona6 {
height: 15%;
background-color: green;
}
<div id="zona1">
vrteb twreb wtre brtwb wtrbrtbtrvrteb twreb wtre brtwb wtrbrtbtrvrteb twreb wtre e brtwb wtrbrtbtrvrteb twreb wtre brtwb wtrbrtbtrvrteb twreb wtre bwb wtrbrtbtrvrteb twreb wtre brtwb wtrbrtbtrvrteb twreb we brtwb wtrbrtbtrvrteb twreb wtre brtwb wtrbrtbtrvrteb
twreb wtre brtwb wtrbrtbtrvrteb twreb wtre brtwb wtrbrtbtr
</div>
<div id="zona2">
vbrebrevrteb twreb wtre brtwb wtrbrtbtrvrteb twreb wtre brtwb wtrbrtbttrvrteb twreb wtre brtwb wtrbrtbtrvrteb twreb wtre brtwb wtrbrtbtrvrteb twreb wtre brtwb wtrbrtbtrvrteb twreb wtre brtwb wtrbrtbtrvrteb twreb wtre brtwb
</div>
<div id="zona3">
ntrbrt
</div>
<div id="zona4">
htrrwt
</div>
<div id="zona5">
hb5ynyre
</div>
<div id="zona6">
hh3653gterbwtebt
</div>
The index.css file is empty.