我有兩個div。但下面的那個覆蓋了上面的那個。怎麼樣? 這是關於div「hoogte」。它在「diveltelling」div旁邊,但div「hoogte」必須在div下面「doeltelling」。 https://jsfiddle.net/5g0ur45u/爲什麼兩個div彼此重疊而沒有定位?
#bovenrij {
width: 80%;
float: right;
margin-right: 3em;
}
#bovenrij div{
width: 20%;
float: left;
}
#interactief{
width: 28%;
background-color: #e8b215;
float: left;
padding-top: 1em;
padding-bottom: 1em;
padding-left:2% ;
padding-right: 2%;
margin-left: 2%;
}
/*licht roze achtergrond kleur*/
#platform, #ad, #platformad, #customised, #personal{
background-color: #f4f4f4;
float: left;
width: 28%;
margin-left: 2%;
margin-bottom: 1em;
padding-top: 1em;
padding-bottom: 1em;
padding-left: 2%;
padding-right: 2%;
}
#interactief > h1{
color: white;
font-size: 18px;
margin-bottom: 0.4em;
}
/*titel*/
#platform > h1, #ad > h1, #platformad > h1, #customised > h1, #personal > h1{
color: #e8b215;
font-size: 18px;
margin-bottom: 0.4em;
}
/*sub titel*/
#interactief > h2, #platform > h2, #ad > h2, #platformad > h2, #customised > h2, #personal > h2{
color: black;
margin-bottom: 1em;
}
/*uitleg tekst*/
#interactief > p, #platform > p, #ad > p, #platformad > p, #customised > p, #personal > p{
line-height: 120%;
margin-bottom: 1em;
}
/*lees meer*/
#interactief > h3 {
margin-left: 0em;
background-color: #3c434a;
padding: 0.5em;
width: 4.75em;
border-radius: 0.3em;
}
/*lees meer*/
#platform > h3, #ad > h3, #platformad > h3, #customised > h3, #personal > h3{
background-color: #3c434a;
width: 4.75em;
padding: 0.5em;
border-radius: 0.3em;
}
@media screen and (max-width: 1088px) {
#bovenrij div{
width: 43%;
float: left;
}
}
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
https://jsfiddle.net/7sgo5kf3/ – Dmitriy