How can I fix the overflow? for reference image of the overflow
my css for this is
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
.container {
background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('bkg2.jpg');
width: 100%;
height: 100vh;
background-position: center;
background-size: cover;
padding-left: 8%;
padding-right: 8%;
box-sizing: border-box;
}
.row {
height: 100%;
display: flex;
align-items: center;
}
.col {
flex-basis: 50%;
}
.col h1 {
color: #fff;
font-size: 10vmin;
}
.ctn1 {
padding: 8px 15px;
background: red;
color: whitesmoke;
border-radius: 20px;
}
.col p {
color: #fff;
font-size: 20px;
line-height: 20px;
}
.col button {
width: 180px;
color: black;
padding: 12px 0;
background: #fff;
border: 0;
border-radius: 20px;
outline: none;
margin-top: 30px;
}
@media(max-width: 650px) {
.col h1 {
font-size: 80px;
}
}
and for the html
html file
Trying out media query but still noting happen. I just want the pictures not to overflow and be in the bottom of the text. please help me with this
3
Answers
Maybe try adding "flex-direction : column" on your .row:
You can add a gap, or margin bottom to the top element.
Maybe is that what you want 🙂
maybe you can resolve the issue by adding
overflow-x: hidden
.Try adding the following code to your CSS file:
or may be 50%.
If it still overflows, try decreasing it further(may be 1 or 2% at a time).
It is hard for us to check reproduce your problem in our system, find a solution and check whether the solution is working without a minimal, reproducible example.