-1

I have the following text divs.

.owners{
  margin: 0px 20px 0px 20px;
}
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div class="row owners">
    <div class="col-sm-3 text-center" style="background-color:lavender;overflow-wrap:break-word;">Owner</div>
    <div class="col-sm-3 text-center" style="background-color:lavenderblush;overflow-wrap:break-word;">Owner</div>
    <div class="col-sm-3 text-center" style="background-color:lavender;overflow-wrap:break-word;">Owner</div>
     <div class="col-sm-3 text-center" style="background-color:lavender;overflow-wrap:break-word;">Owner</div>
  </div>

or the following link: https://codepen.io/Lamdepzai123/pen/RJqPqq

When I edited the content of the text divs, the text will wrap around, making one div changes its size. I would like to know how to make the three other divs change its size according to that div.

I would really appreciate any help.

לבני מלכה
  • 15,925
  • 2
  • 23
  • 47

2 Answers2

1

Add this CSS ! i hope solved your issue.

.row{
    overflow: hidden; 
}

[class*="col-"]{
    margin-bottom: -99999px;
    padding-bottom: 99999px;
}
Ketan
  • 128
  • 7
1

Add this css:

.owners{
  margin: 0px 20px 0px 20px;
  flex-wrap: wrap;
   display: flex;
   justify-content: center;
}
.text-center{
    display: flex;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

And here is the updated codepen

AmmoPT
  • 958
  • 1
  • 9
  • 16