1
I need to make a section
as in the image.
That’s why I organized it this way.
HTML
<section class="second-section">
<div class="container">
<div class="row align-items-center my-5">
<div class="col-md-12 box-orange">
<div class="col-md-6"><img src="img/campos.png" alt="campos"></div>
<div class="col-md-6">
<h3>Texto</h3>
<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Dicta libero saepe natus nam recusandae molestiae neque reprehenderit quae, impedit eos vero, in eligendi voluptas nostrum deserunt odit voluptatibus voluptate quis?
</p>
</div>
</div>
</div>
</div>
</section>
CSS
.second-section{
.box-orange{
background-image:url('/img/fundo2.png');
height: 400px;
color: white;
img{
height: 480px;
margin-top: -5%;
margin-left: -2%;
}
}
}
But the result I got is this, with the text falling down instead of standing next to.
When it comes to responsiveness I need to leave it that way but with col-Md-6 that way it doesn’t stay.
I edited the question with the responsiveness to see if it gets better to understand.
– Guilherme Rigotti
@Guilhermerigotti gave a tweaked code I used @media at breacking point 768px which is the same that Bootstrap uses for medium screens
-md-
, but if you want you can add others, I particularly think you do not need. To move the text away from the left edge I used the classml-5
which is the greatest Bootstrap original, but you can make another one if you want.– hugocsl