Combine elements into a carousel in mobile view? - html

Here are the elements that I want them to be combined into a swipeable carousel. Is there a way to do this? I just want them to turn into carousel only in mobile view.
Here is the HTML if needed. Thanks for help.
<div class="col-md-5 col-xs-12 d-flex justify-content-center little">
<div class="col launch">
<div class="row-sm-3 row-md-4 fx">
<div class="row d-flex justify-content-center resim"><img src="css/img/Icon1.png" alt=""></div>
<div class="row d-flex justify-content-center baslik">First 7 Days Free</div>
<div class="row d-flex justify-content-center yazi">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut.</div>
</div>
<div class="row-sm-3 row-md-4 fx">
<div class="row d-flex justify-content-center resim"><img src="css/img/Icon2.png" alt=""></div>
<div class="row d-flex justify-content-center baslik">Fully Support</div>
<div class="row d-flex justify-content-center yazi">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut.</div>
</div>
</div>
<div class="col star">
<div class="row-sm-3 row-md-4 fx">
<div class="row d-flex justify-content-center resim"><img src="css/img/Icon3.png" alt=""></div>
<div class="row d-flex justify-content-center baslik">Modern Flat Design</div>
<div class="row d-flex justify-content-center yazi">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut.</div>
</div>
<div class="row-sm-3 row-md-4 fx" >
<div class="row d-flex justify-content-center resim" ><img src="css/img/Icon4.png" alt="" id="ozel"></div>
<div class="row d-flex justify-content-center baslik">User Friendly</div>
<div class="row d-flex justify-content-center yazi">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut.</div>
</div>
</div>
</div>

I guess the only opportunity is to have both code for your grid-like display (as shown above) and for your carousel like this:
<!-- Code of your grid view -->
<div id="gridView">
<div class="col-md-5 col-xs-12 d-flex justify-content-center little">
...
</div>
</div>
<!-- Code of your carousel -->
<div id="carouselExampleControls" class="carousel slide mx-3 my-2" data-ride="carousel">
...
</div>
Next use Bootstrap display property to properly show and hide the containers, e.g., d-md-none to hide on md and wider screens and d-none d-md-block to hide on screens smaller than md:
<!-- Code of your grid view -->
<div id="gridView" class="d-none d-md-block">
<div class="col-md-5 col-xs-12 d-flex justify-content-center little">
...
</div>
</div>
<!-- Code of your carousel -->
<div id="carouselExampleControls" class="carousel slide mx-3 my-2 d-md-none" data-ride="carousel">
...
</div>
Since you are using d-flex, I put the extra <div id="gridView"> around it.
Here is an example of a Bootstrap carousel with captions:
<div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleCaptions" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleCaptions" data-slide-to="1"></li>
<li data-target="#carouselExampleCaptions" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<img src="..." class="d-block w-100" alt="...">
<div class="carousel-caption d-none d-md-block">
<h5>First slide label</h5>
<p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
</div>
</div>
<div class="carousel-item">
<img src="..." class="d-block w-100" alt="...">
<div class="carousel-caption d-none d-md-block">
<h5>Second slide label</h5>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
</div>
<div class="carousel-item">
<img src="..." class="d-block w-100" alt="...">
<div class="carousel-caption d-none d-md-block">
<h5>Third slide label</h5>
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleCaptions" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleCaptions" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
You can easily integrate your containers there and combine it with the above mentioned approach.
Good luck!

Related

CSS Bootstrap put button on right bottom corner

I need help putting a button in the bottom-right corner of a Bootstrap col.
I want to put the button where the black outline is in the image below.
<div class="container-fluid m-0">
<div class="d-flex bg-secondary m-0 rounded">
<div class="container">
<div class="row">
<div class="col-sm bg-info">
<div>
</div>
</div>
<div class="col-sm">
<h3> Username</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque dolor leo, iaculis eu rhoncus quis</p>
<p>xxx Followers . xxx Following</p>
</div>
<div class="col-sm bg-danger">
<p class="ml-auto">
<button type="button" class="btn btn-primary">Cancel</button>
</p>
</div>
</div>
</div>
</div>
Check this out--
<div class="container-fluid m-0">
<div class="d-flex bg-secondary m-0 rounded">
<div class="container">
<div class="row">
<div class="col-sm bg-info">
<div>
</div>
</div>
<div class="col-sm">
<h3> Username</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque dolor leo, iaculis eu rhoncus quis</p>
<p>xxx Followers . xxx Following</p>
</div>
<div class="col-sm bg-danger">
<p style="height: 100%" class="d-flex justify-content-end align-items-end">
<button type="button" class="btn btn-primary">Cancel</button>
</p>
</div>
</div>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#4.6.1/dist/css/bootstrap.min.css" integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn" crossorigin="anonymous">
<div class="container-fluid">
<div class="bg-secondary rounded">
<div class="container bg-secondary">
<div class="row align-items-stretch">
<div class="col-12 col-sm bg-info"></div>
<div class="col-12 col-sm">
<div class="py-3">
<h3> Username</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque dolor leo, iaculis eu rhoncus quis</p>
<p>xxx Followers . xxx Following</p>
</div>
</div>
<div class="col-12 col-sm bg-danger">
<div class="h-100 d-flex align-items-end justify-content-end py-3">
<button type="button" class="btn btn-primary">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
There are two methods to implement this...
The first method:
<div class="container-fluid">
<div class="bg-secondary rounded">
<div class="container bg-secondary">
<div class="row align-items-stretch">
<div class="col-12 col-sm bg-info"></div>
<div class="col-12 col-sm">
<div class="py-3">
<h3> Username</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque dolor leo, iaculis eu rhoncus quis</p>
<p>xxx Followers . xxx Following</p>
</div>
</div>
<div class="col-12 col-sm bg-danger">
<div class="h-100 d-flex align-items-end justify-content-end py-3">
<button type="button" class="btn btn-primary">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
This is the easiest one.
The second method:
Go to index.css or App.css or you can go to any other CSS file if you have imported it into your file.
Write this piece of code:
.col-sm {
height: 100%; !important
display: flex; !important
justify-content: flex-end; !important
align-items: flex-end; !important
}
You can also give a class and then write the CSS code based on the class.

Empty div to get spacing according to design using Bootstrap

For bannerimage section which has texts on the specific position, I don't want to write custom CSS to place the div. The below code fits correctly according to design and it's good in responsive also. I've not used this code everywhere but only in 1 section where there is a condition to display div or text at a specific position. I don't want to write custom CSS. But using bootstrap empty div problem is solving, Is this correct or not.
<div class="mainbannerimagewithtext">
<div class=" row-cols-1 row-cols-md-3 g-4 py-5 ">
<div class="col">
</div>
<div class="col">
</div>
<div class="col">
</div>
</div>
<div class=" row-cols-1 row-cols-md-3 g-4 py-5 ">
<div class="col">
</div>
<div class="col">
</div>
<div class="col">
</div>
</div>
<div class=" row-cols-1 row-cols-md-3 g-4 py-5 ">
<div class="col">
</div>
<div class="col">
</div>
<div class="col">
</div>
</div>
<div class=" row-cols-1 row-cols-md-3 g-4 py-5 ">
<div class="col">
</div>
<div class="col">
</div>
<div class="col">
</div>
</div>
<div class=" row-cols-1 row-cols-md-3 g-4 py-5 media ">
<div class="col px-5 ">
<p class="twentyfive ">Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
<p class="fifteen">Lorem ipsum dolor sit amet, consectetur adipiscing elitLorem ipsum dolor sit amet,
consectetur adipiscing elitLorem ipsum dolor sit amet, consectetur adipiscing elit</p>
</div>
<div class="col">
</div>
<div class="col">
</div>
</div>
<div class="container py-5">
<div class=" ">
<div class="text-start px-5 py-5">
<p class="adm-nf-twenty"></p>
<p class="adm-nf-twentyitalic"></p>
</div>
</div>
</div>
<div class="container py-5">
<div class=" ">
<div class="text-start px-5 py-5">
</div>
</div>
</div>
<div class="container py-5">
<div class=" ">
<div class="text-start px-5 py-5">
</div>
</div>
</div>
<div class="container py-5">
<div class=" ">
<div class="text-start px-5 py-5">
</div>
</div>
</div>
<div class="container py-5">
<div class="bluebox ">
<div class="text-start px-5 py-5">
<p class="twenty">Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
<p class="twentyitalic">Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
<p class="fifteenwhite">Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
<p class="fifteenwhite">Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
<p class="fifteenwhite"> Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
</div>
</div>
</div>
My opinion is you should consider using offset for the best practice, also you can customize it for all available screen size Bootstrap provided.
Like this for example :
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<div class="container">
<div class="row">
<div class="col-md-4">normal .col-md-4</div>
<div class="col-md-4 offset-md-4">.col-4 getting offset for 4 col in md screen size</div>
</div>
<div class="row">
<div class="col-md-3 offset-md-3">.col-md-3 getting offset for 3 col in md screen size</div>
<div class="col-md-3 offset-md-3">.col-md-3 getting offset for 3 col in md screen size</div>
</div>
<div class="row">
<div class="col-md-6 offset-md-3">.col-md-6 getting offset for 3 col in md screen size</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
Also always remember offset always arrange the column to the right

Why does my bootstrap v5 card move on vertical window resize?

Problem:
I am currently working on a website and tried my best using/learning bootstrap and wanted to implement e.g. 3 cards. But once I resized the window vertically all my elements shift upwards and it kind of destroys the look of the site, because they overlap into other elements. I think the problem might be my flex elements but I don't know how to make it work any other way.
Code:
Card elements
<section class="row container-fluid h-75 justify-content-evenly align-items-center">
<div class="col-md-3">
<div class="card text-white bg-dark p-4">
<div class="card-body">
<h5 class="card-title">Lorem ipsum dolor sit amet.</h5>
<p class="card-text">Lorem ipsum dolor sit amet consectetur adipisicing elit. Perspiciatis, natus?
</p>
Go somewhere
</div>
</div>
</div>
+2 identical cards
</section>
e.g. my footer
<footer class="container-fluid text-center py-5 text-white bg-dark">
<h1 class="pb-5">Partners:</h1>
<div class="d-lg-flex justify-content-evenly pb-5">
<img class="img-fluid w-25" src=".." alt="">
<img class="img-fluid w-25" src=".." alt="">
</div>
</footer>
Images:
Overlapping card
you can make it work by giving the margin-top on footer and to cards also,
try to run this code, if you need it like this:
<section class="row container-fluid h-75 justify-content-evenly mx-auto align-items-center">
<div class="mb-3 col-12 col-md-3">
<div class="card text-white bg-dark p-4">
<div class="card-body">
<h5 class="card-title">Lorem ipsum dolor sit amet.</h5>
<p class="card-text">
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Perspiciatis, natus?
</p>
Go somewhere
</div>
</div>
</div>
+2 more identical cards
</section>
footer with mt-5
<footer class="container-fluid text-center py-5 mt-5 text-white bg-dark">
<h1 class="pb-5">Partners:</h1>
<div class="d-lg-flex justify-content-evenly pb-5">
<img class="img-fluid w-25" src=".." alt="" />
<img class="img-fluid w-25" src=".." alt="" />
</div>
</footer>

Bootstrap 4 carousel - d-md-flex align-items-md-center brakes col widths

Can't figure out why slide two is causing such a massive change/shift when viewing on desktop. It appears to be the result of adding a d-md-flex align-items-md-center to the enclosing div. Is there something I am overlooking or an alternate method I should be using?
<div class="container-md py-5">
<div class="testimonial-circle rounded-circle bg-white px-n2 px-sm-0 mx-n2 mx-sm-0 d-md-flex align-items-md-center">
<div class="row align-items-center">
<div class="col-12 col-md-4 offset-md-1 mt-5 text-center">
<h2 class="font-weight-bold">People LOVE<br />the This Product<sup>®</sup> </h2>
<p class="d-none d-md-block"><a class="btn btn-outline-primary" href="#">Read Reviews</a></p>
</div>
<div class="col-10 col-md-5 offset-1">
<!-- start carousel -->
<div id="testimonialSlider" class="carousel slide mt-2" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#testimonialSlider" data-slide-to="0" class="active"></li>
<li data-target="#testimonialSlider" data-slide-to="1"></li>
<li data-target="#testimonialSlider" data-slide-to="2"></li>
<li data-target="#testimonialSlider" data-slide-to="3"></li>
<li data-target="#testimonialSlider" data-slide-to="4"></li>
<li data-target="#testimonialSlider" data-slide-to="5"></li>
</ol>
<div class="carousel-inner pt-2 d-block">
<div class="carousel-item active">
<blockquote class="blockquote">
<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed bibendum fringilla eros, sed accumsan odio semper sit amet. Ut viverra ex velit velit sit.</p>
<footer class="blockquote-footer"><cite title="Source Title">Verified User</cite></footer>
</blockquote>
</div>
<div class="carousel-item">
<blockquote class="blockquote">
<p class="mb-0">This brakes the layout Why?</p>
<footer class="blockquote-footer"><cite title="Source Title">Verified User</cite></footer>
</blockquote>
</div>
<div class="carousel-item">
<blockquote class="blockquote">
<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
<footer class="blockquote-footer"><cite title="Source Title">Verified User</cite></footer>
</blockquote>
</div>
<div class="carousel-item">
<blockquote class="blockquote">
<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed bibendum fringilla eros, sed accumsan odio semper sit amet. Ut viverra ex.</p>
<footer class="blockquote-footer"><cite title="Source Title">Verified User</cite></footer>
</blockquote>
</div>
<div class="carousel-item">
<blockquote class="blockquote">
<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed bibendum fringilla eros, sed accumsan odio semper sit amet.</p>
<footer class="blockquote-footer"><cite title="Source Title">Verified User</cite></footer>
</blockquote>
</div>
<div class="carousel-item">
<blockquote class="blockquote">
<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed bibendum fringilla eros,</p>
<footer class="blockquote-footer"><cite title="Source Title">Verified User</cite></footer>
</blockquote>
</div>
</div>
</div>
</div>
</div>
<p class="d-md-none text-center"><a class="btn btn-outline-primary" href="/oral-health/products/dental-water-flosser/WF-11W010-1/">Read Reviews</a></p>
</div>
</div>
The width of your row is changing based on the content because you have your row inside your testimonial-circle division. The row needs to be a child of the container. You can add your customer styles to the container if you need customization.
The other problem you’ll have is, because your carousel is all text, the heights will vary. Easiest way to prevent the text boxes from jumping is to normalize all of the slide heights using jQuery.
Update: To center the blockquote vertically in the carousel-item, you can use transform per this answer How to vertically center a Bootstrap carousel-caption?.
function normalizeSlideHeights() {
$('.carousel').each(function() {
var items = $('.carousel-item', this);
// reset the height
items.css('height', 'auto');
// set the height
var maxHeight = Math.max.apply(null,
items.map(function() {
return $(this).outerHeight()
}).get());
items.css('height', maxHeight + 'px');
})
}
$(window).on(
'load resize orientationchange',
normalizeSlideHeights
);
<link href="https://cdn.jsdelivr.net/npm/bootstrap#4.6.0/dist/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#4.6.0/dist/js/bootstrap.bundle.min.js"></script>
<style>
.carousel-indicators {
bottom: -9px;
margin-bottom: 0;
}
.carousel-indicators li {
background-color: #C7C7C7;
}
.carousel-item {
padding: 4px 0;
}
.carousel-item.active {
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.blockquote {
top: 50%;
transform: translateY(-50%);
position: relative;
}
</style>
<div class="container-md py-5">
<div class="row align-items-center">
<div class="col-12 col-md-4 offset-md-1 text-center">
<h2 class="font-weight-bold mb-4">People LOVE<br />the This Product<sup>®</sup></h2>
<p class="d-none mb-0 d-md-block"><a class="btn btn-outline-primary" href="#">Read Reviews</a></p>
</div>
<div class="col-10 col-md-5 offset-1">
<!-- start carousel -->
<div id="testimonialSlider" class="carousel slide mt-2" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#testimonialSlider" data-slide-to="0" class="active"></li>
<li data-target="#testimonialSlider" data-slide-to="1"></li>
<li data-target="#testimonialSlider" data-slide-to="2"></li>
<li data-target="#testimonialSlider" data-slide-to="3"></li>
<li data-target="#testimonialSlider" data-slide-to="4"></li>
<li data-target="#testimonialSlider" data-slide-to="5"></li>
</ol>
<div class="carousel-inner pt-2 d-block">
<div class="carousel-item active border" style="height: 150px;">
<blockquote class="blockquote">
<p class="mb-0 text-justify">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed bibendum fringilla eros, sed accumsan odio semper sit amet. Ut viverra ex velit velit sit.</p>
<footer class="blockquote-footer"><cite title="Source Title">Verified User</cite></footer>
</blockquote>
</div>
<div class="carousel-item border" style="height: 170px;">
<blockquote class="blockquote">
<p class="mb-0 text-justify">This breakes the layout Why?</p>
<footer class="blockquote-footer"><cite title="Source Title">Verified User</cite></footer>
</blockquote>
</div>
<div class="carousel-item border" style="height: 150px;">
<blockquote class="blockquote">
<p class="mb-0 text-justify">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
<footer class="blockquote-footer"><cite title="Source Title">Verified User</cite></footer>
</blockquote>
</div>
<div class="carousel-item border" style="height: 150px;">
<blockquote class="blockquote">
<p class="mb-0 text-justify">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed bibendum fringilla eros, sed accumsan odio semper sit amet. Ut viverra ex.</p>
<footer class="blockquote-footer"><cite title="Source Title">Verified User</cite></footer>
</blockquote>
</div>
<div class="carousel-item border" style="height: 150px;">
<blockquote class="blockquote">
<p class="mb-0 text-justify">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed bibendum fringilla eros, sed accumsan odio semper sit amet.</p>
<footer class="blockquote-footer"><cite title="Source Title">Verified User</cite></footer>
</blockquote>
</div>
<div class="carousel-item border" style="height: 150px;">
<blockquote class="blockquote">
<p class="mb-0 text-justify">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed bibendum fringilla eros,</p>
<footer class="blockquote-footer"><cite title="Source Title">Verified User</cite></footer>
</blockquote>
</div>
</div>
</div>
</div>
<p class="d-md-none w-100 mt-4 text-center"><a class="btn btn-outline-primary" href="/oral-health/products/dental-water-flosser/WF-11W010-1/">Read Reviews</a></p>
</div>
</div>
Try this code:
<div class="container-md py-5">
<div class="row align-items-center" style="border: 1px solid blue;">
<div class="testimonial-circle rounded-circle bg-white d-flex justify-content-start">
<div class=" text-center" style="width: 25rem; border: 1px solid red;">
<h2 class="font-weight-bold">People LOVE<br />the This Product<sup>®</sup> </h2>
<p class="d-none d-md-block"><a class="btn btn-outline-primary" href="#">Read Reviews</a></p>
</div>
<div class=" " style="flex: 1; border: 1px solid green;">
<!-- start carousel -->
<div id="testimonialSlider" class="carousel slide mt-2" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#testimonialSlider" data-slide-to="0" class="active"></li>
<li data-target="#testimonialSlider" data-slide-to="1" ></li>
</ol>
<div class="carousel-inner pt-2 ">
<div class="carousel-item active">
<blockquote class="blockquote">
<p class="mb-0">This brakes the layout Why?</p>
<footer class="blockquote-footer"><cite title="Source Title">Verified User</cite></footer>
</blockquote>
</div>
<div class="carousel-item">
<blockquote class="blockquote">
<p class="mb-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed bibendum fringilla eros, sed accumsan odio semper sit amet. Ut viverra ex velit velit sit.</p>
<footer class="blockquote-footer"><cite title="Source Title">Verified User</cite></footer>
</blockquote>
</div>
<div class="carousel-item">
<blockquote class="blockquote">
<p class="mb-0">This brakes the layout Why?</p>
<footer class="blockquote-footer"><cite title="Source Title">Verified User</cite></footer>
</blockquote>
</div>
</div>
</div>
</div>
</div>
<p class="d-md-none text-center"><a class="btn btn-outline-primary" href="/oral-health/products/dental-water-flosser/WF-11W010-1/">Read Reviews</a></p>
</div>
</div>
Explanation
I changed of position of row tag, testimonial-circle must be inside
the row.
It was not well resolved from the flex inside the carousel. Pe: the tag on the left
must have a size and the tag on the right should take advantage of
all the available space. With a fixed size, the left tag will not be
modified.
The main problem is that the flex modified it depending on the size of what it had to incorporate.
note: I leave the borders so you can see how the behavior is.
run code
Good luck!

(Bootstrap 4+) - Columns with multiple Elements: Align elements on the same line

So - yes, it's some sort of vertical align thing again (sorry!). I read the documentation and other questions regarding this topic, did my first projects and tried out different approaches, but somehow I can't figure out how to do this the "right way" with bootrap.
I want the elements inside of the columns to align on the same horizontal line (starting from the top) with the respective element from the other column. So, the h3 elements are all on the same horizontal line , the buttons are all on the same line etc.
I made 3 columns
<div class="container">
<div class="row justify-content-around>
<div class="col-md-4 d-flex flex-column align-items-center">
<h3> A Title </h3>
<hr>
<p> looooong text </p> <br>
<img src="an icon" width="55" height="55">
<button> A button </button>
</div>
<div class="col-md-4 d-flex flex-column align-items-center">
<h3> A Title </h3>
<hr>
<p> looooong text </p> <br>
<img src="an icon" width="55" height="55">
<button> A button </button>
</div>
<div class="col-md-4 d-flex flex-column align-items-center">
<h3> A Title </h3>
<hr>
<p> Short text </p> <br>
<img src="an icon" width="55" height="55">
<button> A button </button>
</div>
</div>
</div>
I could use "justify-content-between" on each column. But then, if one of the "p" content is longer than the one of another column, it won't work as intended - the shorter text would not start on the same horizontal line as the other texts, as my example below will demonstrate. Fixing it with manual margins would mess it up, should the text be changed later on by a client.
Justify-Content-Between: This is what I don't want
What would be a good way to achieve this kind of alignment?
You can divide your content and your icon/button into separate rows within each column, and then align the div with the icon/button to the bottom of the column.
<link href="https://cdn.jsdelivr.net/npm/bootstrap#4.5.3/dist/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row justify-content-around">
<div class="col-md-4 d-flex flex-column mb-5">
<div class="row">
<div class="col">
<h3> A Title </h3>
<hr>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.</p>
</div>
</div>
<div class="row align-self-center h-100">
<div class="col d-flex">
<div class="align-self-end">
<img src="an icon" class="d-block my-1 mx-auto" width="55" height="55">
<button> A button </button>
</div>
</div>
</div>
</div>
<div class="col-md-4 d-flex flex-column mb-5">
<div class="row">
<div class="col">
<h3> A Title </h3>
<hr>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</div>
</div>
<div class="row align-self-center h-100">
<div class="col d-flex">
<div class="align-self-end">
<img src="an icon" class="d-block my-1 mx-auto" width="55" height="55">
<button> A button </button>
</div>
</div>
</div>
</div>
<div class="col-md-4 d-flex flex-column mb-5">
<div class="row">
<div class="col">
<h3> A Title </h3>
<hr>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
</div>
<div class="row align-self-center h-100">
<div class="col d-flex">
<div class="align-self-end">
<img src="an icon" class="d-block my-1 mx-auto" width="55" height="55">
<button> A button </button>
</div>
</div>
</div>
</div>
</div>
</div>
I used align-self-end to position the row with the icon and button at the bottom, but IE11 doesn’t support flex start and end, so the layout doesn’t look as nice on IE11.
One other note – your sample code is missing the closing quote for the classes in the line: <div class="row justify-content-around>