I am trying to stretched link for my nested div but it is including even parent. I need only listItem to be clickable but this makes entire card div clickable.
<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="row">
<div class="col-xs-8">
<div class="col-xl-12 col-md-12 mb-3 mt-2">
<div class="card custom-bg-2 h-100">
<div class="card-header bg-secondary">
<h3 class="fw-bold text-white text-center">Page Title</h3>
</div>
<div class="card-body">
<div class="listItem">
<img src="https://via.placeholder.com/100" class="rounded" alt="Title">
<p><span class="badge bg-secondary text-light" style="font-size: large;">Title</span></p>
<p><span class="badge bg-secondary ms-2">Views</span></p>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-4">
<div class="row">
<div class="col-xl-12 col-md-8 mb-3 mt-2">
<div class="card custom-bg-2 h-100">
<div class="card-header bg-secondary">
<h3 class="fw-bold text-white">Category</h3>
</div>
<div class="card-body">
....
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Per the Bootstrap docs (and the fundamental rules of absolute positioning), stretched links apply to the nearest element with non-static positioning. You can put the position-relative class on the parent to make that so.
I've also replaced your inline font size styles with the lead class on the parent paragraph. Just don't use inline styles, especially when your style library provides typography classes for that.
<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="row">
<div class="col-xs-8">
<div class="col-xl-12 col-md-12 mb-3 mt-2">
<div class="card custom-bg-2 h-100">
<div class="card-header bg-secondary">
<h3 class="fw-bold text-white text-center">Page Title</h3>
</div>
<div class="card-body">
<div class="listItem position-relative">
<img src="https://via.placeholder.com/100" class="rounded" alt="Title">
<p class="lead"><span class="badge bg-secondary text-light">Title</span></p>
<p><span class="badge bg-secondary ms-2">Views</span></p>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-4">
<div class="row">
<div class="col-xl-12 col-md-8 mb-3 mt-2">
<div class="card custom-bg-2 h-100">
<div class="card-header bg-secondary">
<h3 class="fw-bold text-white">Category</h3>
</div>
<div class="card-body">
....
</div>
</div>
</div>
</div>
</div>
</div>
</div>
I made these vertical tabs using HTML + CSS only (because I'm challenging myself not to use ANY SCRIPTING AT ALL). It works but I can't disable the automatic scrolling when I open a section and click on a different section.
I know it's a natural behavior to jump on a different section when using anchor links, but I want to disable this so it would look like normal vertical tabs with scripts on it.
Here's my CodePen for this.
https://codepen.io/bosskeito/pen/qBXzdpX
I'm working on Drupal CMS with Bootstrap 4.6.1
.cstmTabTargetVertical:not(:target) {
display: none;
}
.cstmTabTargetVertical:target {
display: block;
}
.cstmTabBtn {
border-radius: 0 !important;
}
.cstmTabVertical .cstmTabBtn {
width: 100%;
}
.cstmTabTargetVertical:before {
content: "";
display: block;
height: 100px;
margin: -100px 0 0 0;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.1/css/bootstrap-grid.min.css" integrity="sha512-Xj2sd25G+JgJYwo0cvlGWXoUekbLg5WvW+VbItCMdXrDoZRWcS/d40ieFHu77vP0dF5PK+cX6TIp+DsPfZomhw==" crossorigin="anonymous" referrerpolicy="no-referrer"
/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.1/css/bootstrap-reboot.min.css" integrity="sha512-ioOlrrQQ3fZN/A7N2rZVm6JXp/Lg7xtda9OaRKornjBcuTW/UqIhTlPyngcGQGrQTOhJgmSltKM4v3Ne03WPug==" crossorigin="anonymous" referrerpolicy="no-referrer"
/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.1/css/bootstrap.min.css" integrity="sha512-T584yQ/tdRR5QwOpfvDfVQUidzfgc2339Lc8uBDtcp/wYu80d7jwBgAxbyMh0a9YM9F8N3tdErpFI8iaGx6x5g==" crossorigin="anonymous" referrerpolicy="no-referrer"
/>
<div class="dFullWidth">
<div class="row">
<div class="col-lg-12 px-0 dBGLightGray">
<div class="container-fluid px-0">
<div class="dContainer1270">
<div class="row mx-auto cstmMobileNarrow">
<div class="col-md-12 my-3">
<p class="dh2 dFontDarkGray mb-0 pb-4">General Information Sheet 1</p>
</div>
<div class="col-md-2 cstmTabVertical">
<a href="#GSI_2021" class="cstmTabBtn mb-2 animButtonSlide animSlideLeft animHover dButtonWhite">
<p class="dh5 mb-0 dFontOrange animHover">2021</p>
</a>
<a href="#GSI_2020" class="cstmTabBtn mb-2 animButtonSlide animSlideLeft animHover dButtonWhite">
<p class="dh5 mb-0 dFontOrange animHover">2020</p>
</a>
</div>
<div class="col-md-10">
<div class="cstmTabTargetVertical" id="GSI_2021">
<div class="row container-fluid px-3">
<div class="col-lg-12">
<p class="dh2 dFontDarkGray pb-4 mb-0">2021</p>
</div>
<div class="col-md-6">
<div class="row container-fluid px-0">
<div class="col-md-12 py-3 px-0">
<div class="row cstmMobileNarrow">
<div class="col-md">
<p class="m-0 dh5"><a class="dLinkOrange animHover" href="https://www.facebook.com/" target="_blank">placeholder link 1</a></p>
<p class="m-0 dp">November 18, 2021</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="cstmTabTargetVertical" id="GSI_2020">
<div class="row container-fluid px-3">
<div class="col-lg-12">
<p class="dh2 dFontDarkGray pb-4 mb-0">2020</p>
</div>
<div class="col-md-6">
<div class="row container-fluid px-0">
<div class="col-md-12 py-3 px-0">
<div class="row cstmMobileNarrow">
<div class="col-md">
<p class="m-0 dh5"><a class="dLinkOrange animHover" href="https://www.facebook.com/" target="_blank">placeholder link 2</a></p>
<p class="m-0 dp">November 18, 2021</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="dFullWidth">
<div class="row">
<div class="col-lg-12 px-0 dBGLightGray">
<div class="container-fluid px-0">
<div class="dContainer1270 py-5">
<div class="row mx-auto py-5 cstmMobileNarrow">
<div class="col-md-12 my-3">
<p class="dh2 dFontDarkGray mb-0 pb-4">General Information Sheet 2</p>
</div>
<div class="col-md-2 cstmTabVertical">
<a href="#GSA_2021" class="cstmTabBtn mb-2 animButtonSlide animSlideLeft animHover dButtonWhite">
<p class="dh5 mb-0 dFontOrange animHover">2021</p>
</a>
<a href="#GSA_2020" class="cstmTabBtn mb-2 animButtonSlide animSlideLeft animHover dButtonWhite">
<p class="dh5 mb-0 dFontOrange animHover">2020</p>
</a>
</div>
<div class="col-md-10">
<div class="cstmTabTargetVertical" id="GSA_2021">
<div class="row container-fluid px-3">
<div class="col-lg-12">
<p class="dh2 dFontDarkGray pb-4 mb-0">2021</p>
</div>
<div class="col-md-6">
<div class="row container-fluid px-0">
<div class="col-md-12 py-3 px-0">
<div class="row cstmMobileNarrow">
<div class="col-md">
<p class="m-0 dh5"><a class="dLinkOrange animHover" href="https://www.facebook.com/" target="_blank">placeholder link 1</a></p>
<p class="m-0 dp">November 18, 2021</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="cstmTabTargetVertical" id="GSA_2020">
<div class="row container-fluid px-3">
<div class="col-lg-12">
<p class="dh2 dFontDarkGray pb-4 mb-0">2020</p>
</div>
<div class="col-md-6">
<div class="row container-fluid px-0">
<div class="col-md-12 py-3 px-0">
<div class="row cstmMobileNarrow">
<div class="col-md">
<p class="m-0 dh5"><a class="dLinkOrange animHover" href="https://www.facebook.com/" target="_blank">placeholder link 2</a></p>
<p class="m-0 dp">November 18, 2021</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="dFullWidth">
<div class="row">
<div class="col-lg-12 px-0 dBGLightGray">
<div class="container-fluid px-0">
<div class="dContainer1270">
<div class="row mx-auto cstmMobileNarrow">
<div class="col-md-12 my-3">
<p class="dh2 dFontDarkGray mb-0 pb-4">General Information Sheet 3</p>
</div>
<div class="col-md-2 cstmTabVertical">
<a href="#GSB_2021" class="cstmTabBtn mb-2 animButtonSlide animSlideLeft animHover dButtonWhite">
<p class="dh5 mb-0 dFontOrange animHover">2021</p>
</a>
<a href="#GSB_2020" class="cstmTabBtn mb-2 animButtonSlide animSlideLeft animHover dButtonWhite">
<p class="dh5 mb-0 dFontOrange animHover">2020</p>
</a>
</div>
<div class="col-md-10">
<div class="cstmTabTargetVertical" id="GSB_2021">
<div class="row container-fluid px-3">
<div class="col-lg-12">
<p class="dh2 dFontDarkGray pb-4 mb-0">2021</p>
</div>
<div class="col-md-6">
<div class="row container-fluid px-0">
<div class="col-md-12 py-3 px-0">
<div class="row cstmMobileNarrow">
<div class="col-md">
<p class="m-0 dh5"><a class="dLinkOrange animHover" href="https://www.facebook.com/" target="_blank">placeholder link 1</a></p>
<p class="m-0 dp">November 18, 2021</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="cstmTabTargetVertical" id="GSB_2020">
<div class="row container-fluid px-3">
<div class="col-lg-12">
<p class="dh2 dFontDarkGray pb-4 mb-0">2020</p>
</div>
<div class="col-md-6">
<div class="row container-fluid px-0">
<div class="col-md-12 py-3 px-0">
<div class="row cstmMobileNarrow">
<div class="col-md">
<p class="m-0 dh5"><a class="dLinkOrange animHover" href="https://www.facebook.com/" target="_blank">placeholder link 2</a></p>
<p class="m-0 dp">November 18, 2021</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
I have a bootstrap card group with a title. Currently, the title is within a card, but I would like this to span over the card group. How can this be done?
<div class="card-group">
<div class="card border-right-0 border-top-0">
<div class="card-header bg-white border-bottom-0 h5 font-weight-light">Project Status Overview</div>
<div class="card-body">
<h1 class="card-text text-primary text-center">#ViewBag.ActiveProjects</h1>
<p class="card-title text-center font-weight-bold">Active Projects</p>
</div>
</div>
<div class="card border-right-0 border-top-0">
<div class="card-header bg-white border-bottom-0 h5 font-weight-light"> </div>
<div class="card-body">
<h1 class="card-text text-secondary text-center">#ViewBag.ArchivedProjects</h1>
<p class="card-title text-center font-weight-bold">Archived Projects</p>
</div>
</div>
<div class="card border-right-0 border-top-0">
<div class="card-header bg-white border-bottom-0 h5 font-weight-light"> </div>
<div class="card-body">
<h1 class="card-text text-warning text-center">3</h1>
<p class="card-title text-center font-weight-bold">Pending Dimensions</p>
</div>
</div>
<div class="card border-top-0">
<div class="card-header bg-white border-bottom-0 h5 font-weight-light"> </div>
<div class="card-body">
<h1 class="card-text text-success text-center">32</h1>
<p class="card-title text-center font-weight-bold">Estimates Available</p>
</div>
</div>
</div>
You can solve this by using Flex box. Wrap the .card-group div in a flex box div, and then move the title div outside the .card-group div.
Example
<div class="d-flex flex-column">
<div class="bg-white border-bottom-0 h5 font-weight-light">title</div>
<div class="card-group"><!-- cards here --></div>
</div>
When using display: flex; (.d-flex), the title div will align with the .card-group div.
Solution:
<div class="d-flex flex-column">
<div class="bg-white border-bottom-0 h5 font-weight-light">Project Status Overview</div>
<div class="card-group">
<div class="card border-right-0 border-top-0">
<div class="card-body">
<h1 class="card-text text-primary text-center">23</h1>
<p class="card-title text-center font-weight-bold">Active Projects</p>
</div>
</div>
<div class="card border-right-0 border-top-0">
<div class="card-body">
<h1 class="card-text text-secondary text-center">5</h1>
<p class="card-title text-center font-weight-bold">Archived Projects</p>
</div>
</div>
<div class="card border-right-0 border-top-0">
<div class="card-body">
<h1 class="card-text text-warning text-center">3</h1>
<p class="card-title text-center font-weight-bold">Pending Dimensions</p>
</div>
</div>
<div class="card border-top-0">
<div class="card-body">
<h1 class="card-text text-success text-center">32</h1>
<p class="card-title text-center font-weight-bold">Estimates Available</p>
</div>
</div>
</div>
</div>
Jsbin example here: https://jsbin.com/xeyiroyasa/edit?html,output
I need to adjust these items to a grid, the first three are aligned but the following are all throughout the webpage the first three are perfectly aligned
I would like to align the rest of the cards like the first three. If someone can help me I would be really grateful.
Thanks. Here is the code below.
<div class="row">
<div class="col-md-4 mb-5">
<h2>Ултразвучни системи:</h2>
</div>
</div>
<!-- /.row -->
<div class="row ">
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\herai10.jpg"alt="">
<div class="card-body">
<h4 class="card-title">HERA I10</h4>
<p class="card-text">Акушерство, Гинекологија.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\heraw10.jpg" alt="">
<div class="card-body">
<h4 class="card-title">HERA W10</h4>
<p class="card-text">Акушерство, Гинекологија.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100" >
<img class="card-img-top" src="img\rs85.jpg" alt="">
<div class="card-body">
<h4 class="card-title">RS85</h4>
<p class="card-text">Радиологија.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch ">
<div class="card h-100">
<img class="card-img-top" src="img\WS80A.jpg" alt="">
<div class="card-body">
<h4 class="card-title">WS80A with Elite</h4>
<p class="card-text">Акушерство, Гинекологија.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\rs80a.jpg" alt="">
<div class="card-body">
<h4 class="card-title">RS80A with Prestige</h4>
<p class="card-text">Радиологија.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\hs70a.jpg" alt="">
<div class="card-body">
<h4 class="card-title">HS70A with Prime</h4>
<p class="card-text">Акушерство, Гинекологија, Кардиоваскуларно, Радиологија.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\hs60.jpg" alt="">
<div class="card-body">
<h4 class="card-title">HS60</h4>
<p class="card-text">Акушерство, Гинекологија, Кардиоваскуларно.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\hs50.jpg" alt="">
<div class="card-body">
<h4 class="card-title">HS50</h4>
<p class="card-text">Акушерство, Гинекологија, Кардиоваскуларно.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\hs40.jpg" alt="">
<div class="card-body">
<h4 class="card-title">HS40</h4>
<p class="card-text">Акушерство, Гинекологија, Кардиоваскуларно.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\hs30.jpg" alt="">
<div class="card-body">
<h4 class="card-title">HS30</h4>
<p class="card-text">Акушерство, Гинекологија, Кардиоваскуларно.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\hm70a.jpg" alt="">
<div class="card-body">
<h4 class="card-title">HM70A with Plus</h4>
<p class="card-text">Акушерство, Гинекологија, Кардиоваскуларно, Точка на Грижење.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\h60.jpg" alt="">
<div class="card-body">
<h4 class="card-title">H60</h4>
<p class="card-text">Акушерство, Гинекологија.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\sonoacer7.jpg" alt="">
<div class="card-body">
<h4 class="card-title">Sonoace R7</h4>
<p class="card-text">Акушерство, Гинекологија.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
</div>
<!-- /.row -->
There is a extra closing </div> tag that is causing the alignment to break.
<div class="row">
<div class="col-md-4 mb-5">
<h2>Ултразвучни системи:</h2>
</div>
</div>
<!-- /.row -->
<div class="row ">
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\herai10.jpg" alt="" />
<div class="card-body">
<h4 class="card-title">HERA I10</h4>
<p class="card-text">Акушерство, Гинекологија.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\heraw10.jpg" alt="" />
<div class="card-body">
<h4 class="card-title">HERA W10</h4>
<p class="card-text">Акушерство, Гинекологија.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\rs85.jpg" alt="" />
<div class="card-body">
<h4 class="card-title">RS85</h4>
<p class="card-text">Радиологија.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch ">
<div class="card h-100">
<img class="card-img-top" src="img\WS80A.jpg" alt="" />
<div class="card-body">
<h4 class="card-title">WS80A with Elite</h4>
<p class="card-text">Акушерство, Гинекологија.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\rs80a.jpg" alt="" />
<div class="card-body">
<h4 class="card-title">RS80A with Prestige</h4>
<p class="card-text">Радиологија.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\hs70a.jpg" alt="" />
<div class="card-body">
<h4 class="card-title">HS70A with Prime</h4>
<p class="card-text">
Акушерство, Гинекологија, Кардиоваскуларно, Радиологија.
</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\hs60.jpg" alt="" />
<div class="card-body">
<h4 class="card-title">HS60</h4>
<p class="card-text">Акушерство, Гинекологија, Кардиоваскуларно.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\hs50.jpg" alt="" />
<div class="card-body">
<h4 class="card-title">HS50</h4>
<p class="card-text">Акушерство, Гинекологија, Кардиоваскуларно.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\hs40.jpg" alt="" />
<div class="card-body">
<h4 class="card-title">HS40</h4>
<p class="card-text">Акушерство, Гинекологија, Кардиоваскуларно.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\hs30.jpg" alt="" />
<div class="card-body">
<h4 class="card-title">HS30</h4>
<p class="card-text">Акушерство, Гинекологија, Кардиоваскуларно.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\hm70a.jpg" alt="" />
<div class="card-body">
<h4 class="card-title">HM70A with Plus</h4>
<p class="card-text">
Акушерство, Гинекологија, Кардиоваскуларно, Точка на Грижење.
</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\h60.jpg" alt="" />
<div class="card-body">
<h4 class="card-title">H60</h4>
<p class="card-text">Акушерство, Гинекологија.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
<div class="col-md-4 mb-5 d-flex align-items-stretch">
<div class="card h-100">
<img class="card-img-top" src="img\sonoacer7.jpg" alt="" />
<div class="card-body">
<h4 class="card-title">Sonoace R7</h4>
<p class="card-text">Акушерство, Гинекологија.</p>
</div>
<div class="card-footer">
Спецификации
</div>
</div>
</div>
</div>
I have card-deck like this
I want to organise these boxs : that the box Total width = Amazon Cost width + BOXI+ width :
below is my code
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<div class="d-flex flex-column justify-content-center align-items-center h-100">
<div class="card-deck w-55">
<div class="card text-center">
<div class="card-header">
<h5 >Amazon Costs</h5>
</div>
<div class="card-body">
<h5 id="amc" class="card-title"></h5>
</div>
</div>
<div class="card text-center">
<div class="card-header">
<h5 >BOXI+</h5>
</div>
<div class="card-body">
<h5 id="boxiP" class="card-title"></h5>
</div>
</div>
</div>
<div class="card text-center">
<div class="card-header">
<h5 >Total</h5>
</div>
<div class="card-body">
<h5 id="tt" class="card-title"></h5>
</div>
</div>
</div>
Add a full width DIV (<div class="w-100"></div>) before the last card...
<div class="d-flex flex-column justify-content-center align-items-center h-100">
<div class="card-deck">
<div class="card text-center">
<div class="card-header">
<h5>Amazon Costs</h5>
</div>
<div class="card-body">
<h5 id="amc" class="card-title"></h5>
</div>
</div>
<div class="card text-center">
<div class="card-header">
<h5>BOXI+</h5>
</div>
<div class="card-body">
<h5 id="boxiP" class="card-title"></h5>
</div>
</div>
<div class="w-100"></div>
<div class="card text-center">
<div class="card-header">
<h5>Total</h5>
</div>
<div class="card-body">
<h5 id="tt" class="card-title"></h5>
</div>
</div>
</div>
</div>
https://www.codeply.com/go/PaLq3R5eXR