Text overlapping on the image

Viewed 32

The text col-xs-9 col-md-9 overlaps with the image col-xs-3 col-md-3. I tried to include img-responsive in the img src but it doesn't work. I didn't use CSS in this part of my activity.

<!-- Latest compiled and minified CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">

<div class="container-fluid padding">
  <div class="p-3 my-4 bg-light rounded-3">
    <div class="row">

      <div class="col-xs-3 col-md-3">
        <img src="https://via.placeholder.com/500" height="224" width="224" class="img-responsive">
      </div>

      <div class="col-xs-9 col-md-9">
        <h1> HELLO!</h1>
        <p class="lead">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
      </div>
    </div>
  </div>
</div>

1 Answers

The img-responsive was renamed to img-fluid. Replace the class name and that should solve your problem.

Related