I have been attempting to create a responsive grid consisting of 6 textboxes using the box class and bootstrap.
My issue is that due to varying amounts of text in each textbox, they end up with different widths/heights. However, I want them all to have the same max-height/max-width as the box containing the most text.
Is there a way to achieve this without manually setting the width/height for each individual textbox?
Below is a snippet of the code:
/***** Box *****/
.flex-box {
position: relative;
text-align: center;
margin-top: 10px;
margin-right: auto;
margin-bottom: ;
margin-left: auto;
padding: 40px;
transition: all 0.3s ease;
background-color: rgb(170, 230, 255);
}
.flex-box:hover {
margin-top: 5px;
margin-bottom: 5px;
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.25);
-moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.25);
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.25);
}
<!-- Textbox-Sections -->
<section id="about_me" class="section-padding title">
<div class="container-fluid">
<div class="container pt-4">
<h1 class="title">About me</h1>
<div class="row">
<div class="col col-12 col-sm-6 col-lg-4">
<div class="flex-box">
<h1 class="boxtitle">My way</h1>
<p class="lead">
<div>Lorem ipsum dolor sit amet consectetur adipisicing elit. Deleniti fuga iusto aspernatur magni rem quas deserunt repellendus hic fugit amet tempora labore perferendis, voluptate possimus itaque cum molestias dolores. Omnis?</div>
</p>
</div>
</div>
<div class="col col-12 col-sm-6 col-lg-4">
<div class="flex-box">
<h1 class="boxtitle">My way</h1>
<p class="lead">
<div>Lorem ipsum dolor sit amet consectetur adipisicing elit. Esse voluptatum soluta cum provident explicabo fugiat dolores odit blanditiis dolorem magni. Quaerat temporibus doloremque beatae voluptatum dignissimos? Eligendi voluptatum similique
incidunt!
</div>
</p>
</div>
</div>
<div class="col col-12 col-sm-6 col-lg-4">
<div class="flex-box">
<h1 class="boxtitle">My way</h1>
<p class="lead">
<div>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptate ipsam neque recusandae similique. Inventore repellendus aliquid delectus explicabo dolore sapiente voluptas nihil dolorem tempore voluptates, nemo ipsum cumque animi quidem.</div>
</p>
</div>
</div>
<div class="col col-12 col-sm-6 col-lg-4">
<div class="flex-box">
<h1 class="boxtitle">My way</h1>
<p class="lead">
<div>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Quod illo incidunt nihil praesentium minus itaque hic, soluta dicta cupiditate quos dolorum esse, harum placeat, qui veritatis animi sunt? Ab, nobis.</div>
</p>
</div>
</div>
<div class="col col-12 col-sm-6 col-lg-4">
<div class="flex-box">
<h1 class="boxtitle">My way</h1>
<p class="lead">
<div>Lorem ipsum dolor sit amet consectetur adipisicing elit. Magni, fuga vel. Maxime hic tempore quo animi ex vero doloribus dolores quos, sapiente delectus dolor et laborum amet quam aspernatur earum.</div>
</p>
</div>
</div>
<div class="col col-12 col-sm-6 col-lg-4">
<div class="flex-box">
<h1 class="boxtitle">My way</h1>
<p class="lead">
<div>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Dicta, repellendus distinctio ratione autem consequatur rerum libero nesciunt ullam eaque molestias odit architecto nisi incidunt quasi omnis ut. Natus, exercitationem alias.</div>
</p>
</div>
</div>
</div>
</div>
</div>
</section>
Here's a link to the CodePen site
Many thanks