-2
I’m having the following problem, my Divs are getting online, I’ve tried several ways to try to insert one under the other, but it still doesn’t work.
The correct would be to stay in the format below:
html,
body {
width: 100%;
height: 100%;
margin-left: -50;
padding: 0;
}
.jumbo {
background-image: url(https://unsplash.it/600/300);
background-size: 100% 100%;
background-repeat: no-repeat;
width: 100%;
height: 100%;
background-position: 0% 0%
}
.container {
width: 100%;
align-items: center;
padding-top: 12.0cm;
float:right;
box-sizing: border-box;
border: 1px solid red;
display: flex;
align-items: right;
flex-wrap: wrap;
padding-top: 1rem;
}
.box {
width: calc(20% - 2rem);
height: 10rem;
margin: 1.0em 1em;
box-sizing: border-box;
display: flex;
position: relative;
}
.p1,
.p2,
.p3 {
display: flex;
align-items: center;
justify-content: center;
color: blue;
font-family: sans-serif;
font-weight: bold;
background-color: #ffffff;
border-bottom-left-radius: 25px;
border-top-left-radius: 25px;
background-color: white;
}
.p1 {
flex-grow: 1;
background-color:#DCDCDC;
color:black;
position: right;
border-bottom-right-radius: 25px;
border-top-right-radius: 25px;
}
.p2 {
flex-grow: 2;
background-color: black;
position: absolute;
color:#DCDCDC;
right: 0;
left: 0;
top: 0;
height: 40px;
border-bottom-right-radius: 25px;
border-top-right-radius: 25px;
}
<div class="jumbo">
<div class="container">
<div class="box">
<div class="p1">
100%
</div>
<div class="p2">
SAMSUNG
</div>
</div>
<div class="box">
<div class="p1">
100%
</div>
<div class="p2">
SAMSUNG
</div>
</div>
<div class="box">
<div class="p1">
100%
</div>
<div class="p2">
SAMSUNG
</div>
</div>
<div class="box">
<div class="p1">
100%
</div>
<div class="p2">
SAMSUNG
</div>
</div>
<div class="box">
<div class="p1">
SAMSUNG
</div>
<div class="p2">
50%
</div>
</div>
<div class="box">
<div class="p1">
100%
</div>
<div class="p2">
SAMSUNG
</div>
</div>
<div class="box">
<div class="p1">
SAMSUNG
</div>
<div class="p2">
50%
</div>
</div>
<div class="box">
<div class="p1">
100%
</div>
<div class="p2">
SAMSUNG
</div>
</div>
</div>
</div>
What is col-6? I didn’t see anything in his CSS, nor in yours
– Caetano Sincero
Hi, Caetano Sincero, col-6 is bootstrap, look at the third line <div class="box col-Md-6"> . Good reference: https://www.w3schools.com/bootstrap4/default.asp
– Rodrigo Almeida Bezerra