Text does not appear when hovering over image - html

When you hover over the image, the place where it should go down from top to bottom does not work and the image does not grow when I hover over it.
Here I want the place labeled "downmen" to go down with a top-down effect. At the same time I want the picture I hover over to grow a little.
As a result, when both hover over the image, I want one to go down from the top and the other to make the image grow.
Note I used bootstrap 5 while doing these.
.section-two-card-inner-two {
position: relative;
}
.section-two-card-inner-two .downmen {
display: none;
position: absolute;
z-index: 1;
width: 100%;
height: 110px;
padding: 2% 10%;
}
.section-two-card-inner-two:hover .downmen {
display: block;
}
.section-two-card-inner-two .downmen img {
height: 55px;
}
.card-title-head {
padding-top: 100px;
}
.section-two-card-inner-two a {
padding-top: 15%;
}
.section-two-card .card-title {
font-weight: 600;
font-family: 'Manrope', sans-serif;
font-size: 1.3rem;
line-height: 26px;
}
.section-two-card .card-text {
font-weight: 700;
font-family: 'League Spartan', sans-serif;
font-size: 26px;
line-height: 30px;
}
.section-two-card .card-text:hover {
color: #ccc;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.0.1/css/bootstrap-grid.min.css" />
<div class="row row-cols-1 row-cols-lg-2 section-two-card m-0">
<div class="col p-2 section-two-card-inner ">
<div class="card bg-dark text-white section-two-card-inner-two ">
<div class="downmen d-flex text-secondary align-items-center ">
<img src="https://picsum.photos/seed/picsum/55" alt=".." class="img-fluid rounded-circle me-3">
<div class="col-10">
<h4 class="fw-normal">Posted by <strong>admin</strong></h4>
<h4 class="fw-normal">August 27, 2025</h4>
</div>
</div>
<img src="https://picsum.photos/500" alt="" class="rounded-4 border-0 img-fluid">
<div class="card-img-overlay p-4 p-sm-5 border border-0 ">
<div class="d-flex card-title-head">
<h5 class="card-title text-secondary">Most Read </h5>
<h4 class="card-title ms-3"><i class="bi bi-clock fs-5 text-white me-2"></i> 6 min read</h4>
</div>
<p class="card-text">This will help you become the first and strengthen your position</p>
Read More <i class="bi bi-arrow-right ms-2 fs-4"></i>
</div>
</div>
</div>
</div>

Your example provides everything you need. Just use your browser to inspect the initial state of the relevant elements (.card_post) and that after forcing hover on .item-wrapper.
The only lingering issue is that the hover state is triggered on an element which is larger than the image. That could be refined with layout adjustments.
.section-two-card-inner-two {
position: relative;
overflow: hidden; /* new */
}
.section-two-card-inner-two img {
transition: all cubic-bezier(0.4, 0, 0.2, 1) 0.4s; /* new */
}
.section-two-card-inner-two:hover img {
transform: scale(1.1); /* new */
}
.section-two-card-inner-two .downmen {
opacity: 0; /* new */
transform: translateY(-10px); /* new */
transition: all cubic-bezier(0.4, 0, 0.2, 1) 0.4s; /* new */
position: absolute;
z-index: 1;
width: 100%;
height: 110px;
padding: 2% 10%;
}
.section-two-card-inner-two:hover .downmen {
opacity: 1; /* new */
transform: translateY(0); /* new */
}
.section-two-card-inner-two .downmen img {
height: 55px;
}
.card-title-head {
padding-top: 100px;
}
.section-two-card-inner-two a {
padding-top: 15%;
}
.section-two-card .card-title {
font-weight: 600;
font-family: 'Manrope', sans-serif;
font-size: 1.3rem;
line-height: 26px;
}
.section-two-card .card-text {
font-weight: 700;
font-family: 'League Spartan', sans-serif;
font-size: 26px;
line-height: 30px;
}
.section-two-card .card-text:hover {
color: #ccc;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.0.1/css/bootstrap-grid.min.css" />
<div class="row row-cols-1 row-cols-lg-2 section-two-card m-0">
<div class="col p-2 section-two-card-inner ">
<div class="card bg-dark text-white section-two-card-inner-two ">
<div class="downmen d-flex text-secondary align-items-center ">
<img src="https://picsum.photos/seed/picsum/55" alt=".." class="img-fluid rounded-circle me-3">
<div class="col-10">
<h4 class="fw-normal">Posted by <strong>admin</strong></h4>
<h4 class="fw-normal">August 27, 2025</h4>
</div>
</div>
<img src="https://picsum.photos/500" alt="" class="rounded-4 border-0 img-fluid">
<div class="card-img-overlay p-4 p-sm-5 border border-0 ">
<div class="d-flex card-title-head">
<h5 class="card-title text-secondary">Most Read </h5>
<h4 class="card-title ms-3"><i class="bi bi-clock fs-5 text-white me-2"></i> 6 min read</h4>
</div>
<p class="card-text">This will help you become the first and strengthen your position</p>
Read More <i class="bi bi-arrow-right ms-2 fs-4"></i>
</div>
</div>
</div>
</div>

Related

Bootstrap container overflowing into footer

I am building a page based on bootstrap5, yet I am having a problem in the positioning of the footer and the main content container.
The page was working fine until I added the footer:
before footer picture:
after footer picture:
I am providing a simplified code as a snippet here (all mages and some styles are broken, but notice the overflow at the bottom of the page):
#import url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');
#import url('https://fonts.googleapis.com/css2?family=Arimo&display=swap');
:root {
--top-header-top-position: 0rem;
--header-height: 3.5rem;
--nav-width: 68px;
--chat-width: 100px;
--primary-color: var(--bs-primary);
--secondary-color: var(--bs-secondary);
--field-gray: var(--bs-field-grey);
--field-grey-transparency: var(--bs-field-grey-transparency);
--white-color: var(--bs-white);
--body-font: 'Arimo', 'Montserrat', sans-serif;
--normal-font-size: 1rem;
--z-fixed: 51;
--z-lnavbar: 50;
--z-chat: 50;
--z-topbar: 51;
}
*,
::before,
::after {
box-sizing: border-box
}
.modal-backdrop {
z-index: 100000 !important;
}
.modal {
z-index: 100001 !important;
}
.top-header {
width: 100%;
height: var(--top-header-top-position);
position: fixed;
top: 0;
left: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 1rem;
background-color: var(--secondary-color);
z-index: var(--z-topbar);
transition: .5s;
text-align: center !important;
}
.header {
width: 100%;
height: var(--header-height);
position: fixed;
top: var(--top-header-top-position);
left: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 1rem;
background-color: var(--primary-color);
z-index: var(--z-fixed);
transition: .5s
}
.main-container-page {
padding-top: calc(var(--header-height) + var(--top-header-top-position) + 5rem);
z-index: 5000;
}
.header_toggle {
color: var(--primary-color);
font-size: 1.5rem;
cursor: pointer;
}
.header_img {
width: 35px;
height: 35px;
display: flex;
justify-content: center;
border-radius: 50%;
overflow: hidden
}
.header_img img {
width: 40px
}
#account-icon:hover {
color: var(--white-color);
}
.l-navbar {
position: fixed;
top: 0;
left: -30%;
width: var(--nav-width);
height: 100vh;
background-color: var(--primary-color);
padding: .5rem 1rem 0 0;
transition: .5s;
z-index: var(--z-lnavbar);
}
.r-navbar {
position: fixed;
top: 0;
right: 0;
width: 0;
height: 100vh;
background-color: var(--primary-color);
padding: 1rem 0 0 1rem;
transition: .5s;
z-index: 5000;
padding: 1rem 0 0 1rem;
}
.nav {
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
overflow: hidden;
margin-top: 5rem;
}
.nav_logo,
.nav_link {
display: grid;
grid-template-columns: max-content max-content;
align-items: center;
column-gap: 1rem;
padding: .5rem 0 1.5rem 2rem;
text-decoration: none;
}
.nav_link {
position: relative;
color: var(--white-color);
margin-bottom: 0rem;
transition: .3s
}
.nav_logo {
margin-bottom: 3rem
}
.nav_logo-icon {
font-size: 1.25rem;
color: var(--white-color)
}
.nav_logo-name {
color: var(--white-color);
font-weight: 700
}
.nav_link:hover {
color: var(--secondary-color) !important;
}
.nav_icon {
margin-left: -1rem;
font-size: 1.2rem;
}
.nav_name {
margin-left: -0.5rem;
font-size: 1rem;
}
.secondary-bs-color {
color: var(--bs-secondary)
}
.white-bs-color {
color: var(--white-color)
}
.show-left-nav {
left: 0;
width: calc(var(--nav-width) + 156px);
}
.show-right-nav {
width: 100%;
}
.body-chat-pd {
padding-right: calc(var(--chat-width) + 1rem);
}
.chat-font {
font-size: small;
}
.time-span-chat {
font-size: smaller;
color: var(--white-color);
}
#chatContainer {
-ms-overflow-style: none; /* for Internet Explorer, Edge */
scrollbar-width: none; /* for Firefox */
overflow-y: scroll;
}
#chatContainer::-webkit-scrollbar {
display: none; /* for Chrome, Safari, and Opera */
}
.active {
font-weight: bold;
color: var(--secondary-color);
}
.active::before {
content: '';
position: absolute;
left: 0;
width: 2px;
height: 32px;
background-color: var(--secondary-color)
}
.height-100 {
height: 100vh
}
.float-icon-chat {
width: 60px;
height: 60px;
bottom: 40px;
right: 40px;
background-color: var(--secondary-color);
color: var(--white-color);
border-radius: 50px;
text-align: center;
vertical-align: middle;
z-index: 100;
}
.coin-dropdown-item {
color: var(--white-color);
}
.coin-dropdown-item:hover {
color: var(--secondary-color);
background-color: var(--field-grey-transparency);
font-weight: bold;
}
#media screen and (min-width: 768px) {
.header {
height: calc(var(--header-height) + 1rem);
padding: 0 2rem 0 1.5rem;
}
.header_img {
width: 40px;
height: 40px
}
.header_img img {
width: 45px
}
.l-navbar {
left: 0;
padding: 1rem 1rem 0 0
}
.r-navbar {
right: 0;
padding: 1rem 0 0 1rem;
width: 0;
}
.show-left-nav {
width: calc(var(--nav-width) + 188px)
}
.body-menu-pd {
padding-left: calc(var(--chat-width) + 188px)
}
.show-right-nav {
width: calc(var(--chat-width) + 188px)
}
.body-chat-pd {
padding-right: calc(var(--chat-width) + 192px)
}
}
/* Media queries for conditional borders on games */
.game-col {
border-left: none;
}
.game-block {
border-bottom: none;
}
.game-top {
border-top: 1px solid var(--white-color);
}
#media (min-width: 576px) {
.game-col {
border-left: 1px solid var(--white-color);
}
.game-block {
border-bottom: 1px solid var(--white-color);
}
.game-top {
border-top: none;
}
}
/* crash game */
.crash-canvas {
height: 90%;
width: 100%;
max-width: 750px;
border-radius: 7px;
background-color: #0f1923;
margin: 0rem auto 2rem auto;
}
/* betting menu */
.bet-menu-buttons {
border-radius: 0.8rem;
width: 55px;
height: 50px;
font-size: 1.0rem;
color: rgba(255, 255, 255, 0.5);
display: flex;
justify-content: center;
align-items: center;
background-color: #262833;
color: #fff;
}
.crash-result {
border-radius: 0.8rem;
width: 40px;
height: 35px;
font-size: 0.7rem;
color: rgba(255, 255, 255, 0.5);
display: flex;
justify-content: center;
align-items: center;
background-color: #262833;
color: #fff;
}
.bettor-table-item {
border-bottom: 1px solid var(--white-color);
}
.bet-box1 {
border-left: 0.5px solid var(--field-grey-transparency);
border-top: 0.5px solid var(--field-grey-transparency);
border-right: 0.0px solid var(--field-grey-transparency);
border-bottom: 0.5px solid var(--field-grey-transparency);
}
.bet-box2 {
border-left: 0.0px solid var(--field-grey-transparency);
border-top: 0.5px solid var(--field-grey-transparency);
border-right: 0.0px solid var(--field-grey-transparency);
border-bottom: 0.5px solid var(--field-grey-transparency);
}
.bet-box3 {
border-left: 0.5px solid var(--field-grey-transparency);
border-top: 0.5px solid var(--field-grey-transparency);
border-right: 0.5px solid var(--field-grey-transparency);
border-bottom: 0.5px solid var(--field-grey-transparency);
}
.bet-box3:focus {
border-left: 0.5px solid var(--field-grey-transparency);
border-top: 0.5px solid var(--field-grey-transparency);
border-right: 0.5px solid var(--field-grey-transparency);
border-bottom: 0.5px solid var(--field-grey-transparency);
}
/* pre-footer */
.pre-footer {
height: 700px;
}
#media (min-width: 576px) {
.pre-footer {
height: 200px;
}
.footer-padding {
padding-left: var(--nav-width);
}
}
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<!--Container Main start-->
<div class="height-100 main-container-page">
<div class="container h-100">
<div class="row gx-0">
<div class="col-12 col-sm-5 order-sm-1 order-2 bg-transparent text-center game-top pt-5 pb-5 ps-5 pe-5 d-flex flex-column justify-content-evenly">
<div class="input-group mb-3 pb-3">
<span class="bet-box1 bg-primary text-white fw-bold input-group-text">Amount</span>
<span class="bet-box2 bg-primary text-white fw-bold input-group-text">TC</span>
<input type="text" class="bet-box3 bg-primary text-white form-control" placeholder="select value here" aria-label="Dollar amount (with dot and two decimal places)">
</div>
<div class="d-flex justify-content-between mb-3 pb-3">
<div class="bet-menu-buttons bg-primary text-white border border-field-grey-transparency">
2x
</div>
<div class="bet-menu-buttons bg-primary text-white border border-field-grey-transparency">
10x
</div>
<div class="bet-menu-buttons bg-primary text-white border border-field-grey-transparency">
1/2
</div>
<div class="bet-menu-buttons bg-primary text-white border border-field-grey-transparency">
+5
</div>
<div class="bet-menu-buttons bg-primary text-white border border-field-grey-transparency">
+10
</div>
</div>
<div class="d-block flex-column justify-content-center align-items-start mb-3 pb-3">
<span class="text-white fw-bold">
Select your side
</span>
</div>
<div class="d-block justify-content-arround h-100 w-100 mb-3 pb-3">
<img class="coin-bet-button ps-2 pe-2" src="./img/coin1.png" alt="coin1">
<img class="coin-bet-button ps-2 pe-2" src="./img/coin2.png" alt="coin2">
</div>
<div class="d-flex flex-column mb-3 pb-3">
<button class="btn btn-secondary fw-bold border border-secondary rounded-pill">Bet</button>
</div>
<div class="d-flex justify-content-between pt-3">
<div class="d-block ps-3">
<i class="fas fa-expand fa-2x text-white"></i>
</div>
<div class="d-flex pe-3">
<div class="d-block">
<i class="fas fa-history fa-2x text-white"></i>
</div>
<div class="d-block ps-3">
<i class="fas fa-volume-mute fa-2x text-white"></i>
</div>
</div>
</div>
</div>
<div class="col-12 col-sm-7 order-sm-2 order-1 bg-transparent text-center game-col pb-5">
<div class="d-block h-80 game-block pt-4 ps-4 pe-4">
<div class="d-block h-3 ps-5 pt-3 pb-5">
<div class="d-flex bg-transparent w-92 position-relative" style="height: 22px;">
<span class="position-absolute w-100 start-0 text-white fw-bold">Girando em 00:20</span>
<div id="time-bar" class="d-flex border border-0 border-primary rounded-pill bg-secondary ps-1 pe-1 pt-1 pb-1" style="height: 22px; width: 5%;"></div>
</div>
</div>
<div class="d-flex">
<div class="coin" id="coin" data-spin="tails">
<div class="coin__front"></div>
<div class="coin__edge">
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
</div>
<div class="coin__back"></div>
<div class="coin__shadow"></div>
</div>
</div>
</div>
<div class="d-flex flex-column h-35 game-top ps-3 pt-3 pb-5">
<div class="d-flex text-white fw-bold ms-1 mb-2">
Last runs:
</div>
<div class="d-flex justify-content-start">
<img class="coin-bet-button ps-2 pe-2" src="./img/coin1.png" alt="coin1" style="min-width: 0;">
<img class="coin-bet-button ps-2 pe-2" src="./img/coin2.png" alt="coin2" style="min-width: 0;">
<img class="coin-bet-button ps-2 pe-2" src="./img/coin1.png" alt="coin1" style="min-width: 0;">
<img class="coin-bet-button ps-2 pe-2" src="./img/coin2.png" alt="coin2" style="min-width: 0;">
<img class="coin-bet-button ps-2 pe-2" src="./img/coin1.png" alt="coin1" style="min-width: 0;">
<img class="coin-bet-button ps-2 pe-2" src="./img/coin2.png" alt="coin2" style="min-width: 0;">
<img class="coin-bet-button ps-2 pe-2" src="./img/coin1.png" alt="coin1" style="min-width: 0;">
<img class="coin-bet-button ps-2 pe-2" src="./img/coin2.png" alt="coin2" style="min-width: 0;">
</div>
</div>
</div>
</div>
<!-- Row for displaying bets -->
<div class="row mt-5 pb-5 mb-5 gx-0">
<div class="col-12 col-sm-5 bg-primary mt-5">
<div class="container pt-3 pb-3 ps-3 pe-3">
<div class="row gx-0 border-bottom border-white border-2 pb-4">
<div class="col-4">
<img class="mx-auto d-block w-50" src="./img/coin1.png" alt="heads">
</div>
<div class="col-2"></div>
<div class="col-6 align-self-center">
<div class="text-white" style="font-size: xx-large;"> Win 1.9x</div>
</div>
</div>
<div class="row gx-0">
<div class="col-12 mt-3">
<div class="d-flex justify-content-between">
<div class="d-block">
<span class="text-white">Total bets</span>
</div>
<div class="d-block">
<div class="text-white" style="font-size: larger;"><span class="fw-bold">0 TC</span></div>
</div>
</div>
</div>
</div>
<div class="row gx-0 bg-secondary mt-3">
<div class="col-8 text-left text-white ps-3">User</div>
<div class="col-4 text-center text-white">Bet</div>
</div>
<div class="row gx-0 pt-2 pb-2 ">
<div class="col-8 text-left text-white ps-3">Elon Musk</div>
<div class="col-4 text-center text-white">270 TC</div>
</div>
<div class="row gx-0 pt-2 pb-2 ">
<div class="col-8 text-left text-white ps-3">Tony Ramos</div>
<div class="col-4 text-center text-white">135 TC</div>
</div>
</div>
</div>
<div class="col-sm-2"></div>
<div class="col-12 col-sm-5 bg-primary bg-opacity-50 mt-5">
<div class="container pt-3 pb-3 ps-3 pe-3">
<div class="row gx-0 border-bottom border-white border-2 pb-4">
<div class="col-4">
<img class="mx-auto d-block w-50" src="./img/coin2.png" alt="heads">
</div>
<div class="col-2"></div>
<div class="col-6 align-self-center">
<div class="text-white" style="font-size: xx-large;"> Win 1.9x</div>
</div>
</div>
<div class="row gx-0">
<div class="col-12 mt-3">
<div class="d-flex justify-content-between">
<div class="d-block">
<span class="text-white">Total bets</span>
</div>
<div class="d-block">
<div class="text-white" style="font-size: larger;"><span class="fw-bold">0 TC</span></div>
</div>
</div>
</div>
</div>
<div class="row gx-0 bg-secondary mt-3">
<div class="col-8 text-left text-white ps-3">User</div>
<div class="col-4 text-center text-white">Bet</div>
</div>
<div class="row gx-0 pt-2 pb-2 ">
<div class="col-8 text-left text-white ps-3">Elon Musk</div>
<div class="col-4 text-center text-white">270 TC</div>
</div>
<div class="row gx-0 pt-2 pb-2 ">
<div class="col-8 text-left text-white ps-3">Tony Ramos</div>
<div class="col-4 text-center text-white">135 TC</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--Container Main end-->
<a class="position-fixed bottom-5 end-5 float-icon-chat" id="chatButton" role="button">
<span class="position-absolute top-15 start-20"><i class="far fa-comment-dots" style="font-size: 40px;"></i></span>
</a>
<div class="pre-footer mt-5 pt-5 mb-5 pb-5"></div>
<footer class="text-center text-lg-start bg-primary text-muted pt-5 mt-5 w-100">
<div class="container text-center text-md-start mt-5">
<div class="row mt-3">
<div class="col-6 mx-auto mt-5 mb-5">
<div class="d-block justify-content-center">
<div class="d-flex justify-content-center">
<img class="w-40 h-auto center-block" src="./img/Logo horizontal.png" alt="Vegaz logo">
</div>
<div class="d-flex justify-content-center mt-3">
<i class="fab fa-instagram fa-4x me-3"></i>
<i class="fab fa-facebook fa-4x"></i>
</div>
</div>
</div>
<div class="col-1"></div>
<div class="col-5 mx-auto mt-4 mb-4 position-relative">
<div class="d-flex">
<h3 class="text-white fw-bold">About Us</h3>
</div>
<div class="d-flex">
Terms of service
</div>
<div class="d-flex">
Privacy policy
</div>
<div class="d-flex position-absolute bottom-0 start-2">
<span>©2022 Vegaz All rights reserved</span>
</div>
</div>
</div>
</div>
</footer>
You're assigning the main containers a fixed height based on the viewport size (classes height-100 and h-100), even when the viewport is smaller than the content of those containers. The content will therefore overflow the container into whatever comes after it, in this case the footer.

Apply semi transparent cover on background image [duplicate]

This question already has answers here:
Semi-transparent color layer over background-image?
(19 answers)
Closed last year.
I'm build a page that nedds a background image with a semi transparent black cover on top (rgba 0 0 0 0.5).
My initial solution was to do:
<body id="body-pd" style="background: url('./img/Home e Roleta.png') no-repeat center center fixed; background-size: cover; box-shadow: inset 0 0 0 1000px rgba(0,0,0,.5);">
And I though it had worked. But now that I'm developing some larger pages in the site, it appears that when I scroll down the semi transparent cover doesn't follow along:
I tried to find a solution online, but couldn't find any topics on the matter.
Does anyone have an idea of how it can be solved?
Full code (uses bootstrap5):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link href="./css/custom.css" rel="stylesheet">
<link href="./css/navlayout.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/boxicons#latest/css/boxicons.min.css" rel="stylesheet">
<script defer src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<script defer src="./js/navlayout.js"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/js/all.min.js" crossorigin="anonymous"></script>
<script defer src="./js/crash.js"></script>
<link rel="icon" href="./img/icon.png" />
<title>Vegaz.bet</title>
</head>
<body id="body-pd" style="background: url('./img/Home e Roleta.png') no-repeat center center fixed; background-size: cover; box-shadow: inset 0 0 0 1000px rgba(0,0,0,.5);">
<header class="top-header align-middle">
<div class="mx-auto"></div>
</header>
<header class="header" id="header">
<div class="d-flex">
<div class="header_toggle me-3" id="toggle-up"> <i class="fas fa-bars secondary-bs-color" id="header-toggle"></i></div>
<img style="width: 50px;" class="h-auto me-1 d-none d-sm-flex" src="./img/Logo Vegaz Bet MOEDA.png" alt="">
<img style="width: 120px;" class="h-auto d-flex" src="./img/Logo Vegaz Bet ESCRITA.png" alt="">
</div>
<div id="nav-buttons" class="d-flex">
<button type="button" class="white-bs-color fw-bold btn btn-primary me-4" data-bs-toggle="modal" data-bs-target="#login-modal">Login</button>
<button type="button" class="white-bs-color fw-bold btn btn-secondary" data-bs-toggle="modal" data-bs-target="#registration-modal">Register</button>
</div>
</header>
<div class="l-navbar" id="nav-bar">
<nav class="nav">
<div>
<div class="nav_list">
<i class="fas fa-chart-line nav_icon secondary-bs-color"></i> <span class="nav_name">Crash</span>
<i class="far fa-life-ring nav_icon secondary-bs-color"></i> <span class="nav_name">Roullete</span>
<i class="fas fa-dice nav_icon secondary-bs-color"></i> <span class="nav_name">Dice</span>
<i class="fas fa-coins nav_icon secondary-bs-color"></i> <span class="nav_name">Heads or Tails</span>
<hr class="bg-white border-2 border-top border-white">
<i class="fas fa-hand-holding-usd nav_icon white-bs-color"></i> <span class="nav_name">Deposit /<br> Withdrawal</span>
<i class="far fa-question-circle nav_icon white-bs-color"></i> <span class="nav_name">Help</span>
</div>
</div>
</nav>
</div>
<div class="r-navbar invisible" id="nav-bar-chat">
<div id="invisible-toggle-div" class="container pb-5 invisible">
<div class="row h-20 mb-1">
<button id="close-chat" type="button" class="position-absolute top-8 start-10 btn-close btn-close-white" aria-label="Close"></button>
<button type="button" class="w-50 position-absolute top-7 end-10 white-bs-color fw-bold btn btn-primary"><span class="text-nowrap">Vegaz Chat</span></button>
</div>
<div class="row h-60">
<div id="chatContainer" class="chat-font d-flex flex-column bd-highlight position-absolute top-15 end-5 w-90 h-75">
<span class="time-span-chat ms-2">11:29</span>
<div class="card bg-field-grey text-white mb-1">
<span class="pt-1 pb-1 ps-1 pe-1"><span class="fw-bold" style="color: yellow">youranus420:</span> oi putões</span>
</div>
<span class="time-span-chat ms-2">11:29</span>
<div class="card bg-field-grey text-white mb-1">
<span class="pt-1 pb-1 ps-1 pe-1"><span class="fw-bold" style="color: yellow">youranus420:</span> bora crash?</span>
</div>
<span class="time-span-chat ms-2">11:30</span>
<div class="card bg-field-grey text-white mb-1">
<span class="pt-1 pb-1 ps-1 pe-1"><span class="fw-bold" style="color: purple">elon musk:</span> Olha o nome do cara kkkkk</span>
</div>
</div>
</div>
<div class="row h-10">
<div class="bg-primary text-center position-absolute end-3 bottom-6 w-94 h-5">
<div class="input-group mb-3">
<input type="text" class="chat-font form-control" placeholder="Your message" aria-label="Message">
<button class="chat-font btn btn-outline-secondary" type="button" id="button-addon2">Send</button>
</div>
</div>
</div>
</div>
</div>
<!--Container Main start-->
<div class="height-100 main-container-page">
<div class="container h-100">
<img style="display: none;" src="./img/foguete.png" alt="foguete" id="img-rocket" />
<img style="display: none;" src="./img/explosion.png" alt="explosion" id="img-explosion" />
<div class="row h-50 gx-0">
<div class="col-12 col-sm-5 order-sm-1 order-2 bg-opacity-white bg-opacity-25 text-center game-top pt-4 ps-5 pe-5">
<div class="card bg-field-grey text-white mb-3">
<div class="d-flex justify-content-between">
<button type="button" class="white-bs-color fw-bold opacity-50 btn btn-primary w-46">Normal</button>
<button type="button" class="white-bs-color fw-bold btn btn-primary w-46">Auto</button>
</div>
</div>
<div class="card bg-field-grey text-white mb-3">
<span class="pt-1 pb-1 ps-1 pe-1"><span class="fw-bold" style="color: yellow">youranus420:</span> oi putões</span>
</div>
</div>
<div class="col-12 col-sm-7 order-sm-2 order-1 bg-opacity-white bg-opacity-25 text-center game-col">
<div class="d-flex h-80 game-block pt-4 ps-4 pe-4">
<canvas class="crash-canvas" id="canvas" height="400px" width="700px"></canvas>
</div>
<div class="d-block h-35 game-top ps-3 pt-3">
<div class="d-flex text-white fw-bold ms-1 mb-3">
Last runs:
</div>
<div class="d-flex justify-content-start">
<span class="badge bg-primary ms-1 me-1">2.37x</span>
<span class="badge bg-primary ms-1 me-1">2.37x</span>
<span class="badge bg-primary ms-1 me-1">2.37x</span>
<span class="badge bg-primary ms-1 me-1">2.37x</span>
<span class="badge bg-primary ms-1 me-1">2.37x</span>
</div>
</div>
</div>
</div>
</div>
</div>
<a class="position-absolute bottom-5 end-5 float-icon-chat" id="chatButton" role="button">
<span class="position-absolute top-15 start-20"><i class="far fa-comment-dots" style="font-size: 40px;"></i></span>
</a>
<!--Container Main end-->
</body>
</html>
CSS:
#import url("https://fonts.googleapis.com/css2?family=Montserrat&display=swap");
:root {
--top-header-top-position: 1.5rem;
--header-height: 3rem;
--nav-width: 68px;
--chat-width: 100px;
--primary-color: var(--bs-primary);
--secondary-color: var(--bs-secondary);
--field-gray: var(--bs-field-grey);
--field-grey-transparency: var(--bs-field-grey-transparency);
--white-color: var(--bs-white);
--body-font: 'Montserrat', sans-serif;
--normal-font-size: 1rem;
--z-fixed: 100;
--z-topbar: 101;
}
*,
::before,
::after {
box-sizing: border-box
}
.top-header {
width: 100%;
height: var(--top-header-top-position);
position: fixed;
top: 0;
left: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 1rem;
background-color: var(--secondary-color);
z-index: var(--z-topbar);
transition: .5s;
text-align: center !important;
}
.header {
width: 100%;
height: var(--header-height);
position: fixed;
top: var(--top-header-top-position);
left: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 1rem;
background-color: var(--primary-color);
z-index: var(--z-fixed);
transition: .5s
}
.main-container-page {
padding-top: calc(var(--header-height) + var(--top-header-top-position) + 5rem);
z-index: 5000;
}
.header_toggle {
color: var(--primary-color);
font-size: 1.5rem;
cursor: pointer
}
.header_img {
width: 35px;
height: 35px;
display: flex;
justify-content: center;
border-radius: 50%;
overflow: hidden
}
.header_img img {
width: 40px
}
.l-navbar {
position: fixed;
top: 0;
left: -30%;
width: var(--nav-width);
height: 100vh;
background-color: var(--primary-color);
padding: .5rem 1rem 0 0;
transition: .5s;
z-index: var(--z-fixed)
}
.r-navbar {
position: fixed;
top: 0;
right: 0;
width: 0;
height: 100vh;
background-color: var(--primary-color);
padding: 1rem 0 0 1rem;
transition: .5s;
z-index: var(--z-fixed);
padding: 1rem 0 0 1rem;
}
.nav {
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
overflow: hidden;
margin-top: 5rem;
}
.nav_logo,
.nav_link {
display: grid;
grid-template-columns: max-content max-content;
align-items: center;
column-gap: 1rem;
padding: .5rem 0 .5rem 1.5rem;
text-decoration: none;
}
.nav_logo {
margin-bottom: 2rem
}
.nav_logo-icon {
font-size: 1.25rem;
color: var(--white-color)
}
.nav_logo-name {
color: var(--white-color);
font-weight: 700
}
.nav_link {
position: relative;
color: var(--white-color);
margin-bottom: 1.5rem;
transition: .3s
}
.nav_link:hover {
color: var(--white-color)
}
.nav_icon {
font-size: 1.25rem;
}
.secondary-bs-color {
color: var(--bs-secondary)
}
.white-bs-color {
color: var(--white-color)
}
.show-left-nav {
left: 0;
width: calc(var(--nav-width) + 156px);
}
.show-right-nav {
width: 100%;
}
.body-menu-pd {
padding-left: calc(var(--nav-width) + 188px);
}
.body-chat-pd {
padding-right: calc(var(--chat-width) + 1rem);
}
.chat-font {
font-size: small;
}
.time-span-chat {
font-size: smaller;
color: var(--white-color);
}
#chatContainer {
-ms-overflow-style: none; /* for Internet Explorer, Edge */
scrollbar-width: none; /* for Firefox */
overflow-y: scroll;
}
#chatContainer::-webkit-scrollbar {
display: none; /* for Chrome, Safari, and Opera */
}
.active {
color: var(--white-color)
}
.active::before {
content: '';
position: absolute;
left: 0;
width: 2px;
height: 32px;
background-color: var(--white-color)
}
.height-100 {
height: 100vh
}
.float-icon-chat {
width: 60px;
height: 60px;
bottom: 40px;
right: 40px;
background-color: var(--secondary-color);
color: var(--white-color);
border-radius: 50px;
text-align: center;
vertical-align: middle;
z-index: 100;
}
.coin-dropdown-item {
color: var(--white-color);
}
.coin-dropdown-item:hover {
color: var(--secondary-color);
background-color: var(--field-grey-transparency);
font-weight: bold;
}
#media screen and (min-width: 768px) {
.header {
height: calc(var(--header-height) + 1rem);
padding: 0 2rem 0 calc(var(--nav-width) + 2rem)
}
.header_img {
width: 40px;
height: 40px
}
.header_img img {
width: 45px
}
.l-navbar {
left: 0;
padding: 1rem 1rem 0 0
}
.r-navbar {
right: 0;
padding: 1rem 0 0 1rem;
width: 0;
}
.show-left-nav {
width: calc(var(--nav-width) + 156px)
}
.show-right-nav {
width: calc(var(--chat-width) + 156px)
}
.body-menu-pd {
padding-left: calc(var(--nav-width) + 188px);
}
.body-chat-pd {
padding-right: calc(var(--chat-width) + 156px)
}
}
/* Media queries for conditional borders on games */
.game-col {
border-left: none;
}
.game-block {
border-bottom: none;
}
.game-top {
border-top: 1px solid var(--white-color);
}
#media (min-width: 576px) {
.game-col {
border-left: 1px solid var(--white-color);
}
.game-block {
border-bottom: 1px solid var(--white-color);
}
.game-top {
border-top: none;
}
}
/* crash game */
.crash-canvas {
width: 100%;
max-width: 750px;
border-radius: 7px;
background-color: #0f1923;
margin: 0rem auto 2rem auto;
}
Why do you don't use the CSS filter property on your background image? you can use filter: brightness(0.5); or filter: opacity(0.5); on your image to make it semi-transparent black.
more of CSS filter property: https://developer.mozilla.org/en-US/docs/Web/CSS/filter
Why not use linear-gradient with background-image like so
background-image: linear-gradient(rgba( 0, 0, 0, 0.5), rgba( 0, 0, 0, 0.5)), url("./img/Home e Roleta.png");
Since both color are same(rgba( 0, 0, 0, 0.5)) shades will be constant and will be part of the background-image.

text does not want to be under the image. using bootstrap

Hi guys do you know how to make this text under the image. i've tried use absolute on the text and it's work but when i test the responsive text gonna be the bottom of content not under the picture.
#sorryforbadenglish
.fitur {
padding: 15px 0;
text-align: center;
}
.fitur .btn-get-started {
font-family: "Roboto", sans-serif;
text-transform: uppercase;
font-weight: 500;
font-size: 14px;
letter-spacing: 1px;
display: inline-block;
padding: 10px 28px;
border-radius: 4px;
transition: 0.5s;
color: #fff;
background-image: url("../img/gplay.png");
background-size: cover;
width: 210px;
height: 61px;
}
.fitur .col-half-offset {
margin-left: 4.166666667%
}
.fitur p.sub {
font-size: 16px;
font-family: "Ubuntu", sans-serif;
font-weight: 700;
}
.fitur img {
max-width: 200%;
transition: all 0.4s ease-in-out;
display: inline-block;
padding: 15px 0;
}
.fitur img:hover {
transform: scale(1.15);
}
#media (max-width: 768px) {
.fitur img {
max-width: 100%;
}
}
#media (min-width: 1024px) {}
#media (max-width: 500px) {}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<section id="fitur" class="fitur section-bg">
<div class="container" data-aos="zoom-in">
<div class="section-title">
<p style="margin-top: 100px;">Fitur</p>
<h3>Aplikasi</h3>
</div>
<div class="row">
<div class="col-lg-2 d-flex align-items-center justify-content-center">
<img src="assets/img/aplikasi/01.png" class="img-fluid" alt="">
<p class="sub">Jual Sampah</p>
</div>
<div class="col-lg-2 col-half-offset d-flex align-items-center justify-content-center">
<img src="assets/img/aplikasi/02.png" class="img-fluid" alt="">
<p class="sub">Harga Real Time</p>
</div>
<div class="col-lg-2 col-half-offset d-flex align-items-center justify-content-center">
<img src="assets/img/aplikasi/05.png" class="img-fluid" alt="">
<p class="sub">Transaksi Terdata</p>
</div>
<div class="col-lg-2 col-half-offset d-flex align-items-center justify-content-center">
<img src="assets/img/aplikasi/06.png" class="img-fluid" alt="">
<p class="sub">Layanan Komunikasi</p>
</div>
<div class="col-lg-2 col-half-offset d-flex align-items-center justify-content-center">
<img src="assets/img/aplikasi/07.png" class="img-fluid" alt="">
<p class="sub">Rangkuman Transaksi</p>
</div>
</div>
<div class="d-flex">
</div>
</div>
</section>
the result is :
The text is next to the image, can you help me how to take it under the image ?
Add flex-column to the parent div which contains the image and text. Like this
<div class="col-lg-2 d-flex align-items-center justify-content-center flex-column">
<img src="assets/img/aplikasi/01.png" class="img-fluid" alt="">
<p class="sub">Jual Sampah</p>
</div>
By default the flex direction is row and it needs to be set to column so that the image and text are stacked on top of each other

How to change the order of website items on a phone screen

On my website I have the following section:
<div class="container">
<div class="row text-center mb-4 mt-2">
<div class="col-md-12">
<div class="w-100 col-md-12 pb-4 pt-1 bg-light">
<div class="row align-items-center">
<div class="col-md-4">
<h4 class="font-weight-bold">Step 1:</h4>
<h5 class="pl-5 pr-5">Search for people based on your keywords.</h5>
</div>
<div class="col-md-8 mb-5 mt-4">
<div class="icon-box">
<img src="static/images/step1.jpg" class="img-fluid
mx-auto d-block border" />
</div>
</div>
<div class="col-md-8 mt-5 mb-5">
<div class="icon-box">
<img src="static/images/step2.jpg" class="img-fluid
mx-auto d-block border" />
</div>
</div>
<div class="col-md-4">
<h4 class="font-weight-bold">Step 2:</h4>
<h5 class="pl-5 pr-5">The results are sorted by a person's responsiveness. Choose from a\
list of matches who are ready and willing to interact.</h5>
</div>
<div class="col-md-4">
<h4 class="font-weight-bold">Step 3:</h4>
<h5 class="pl-5 pr-5">Message and make connections with people who are open for (real or\
virtual) coffee!</h5>
</div>
<div class="col-md-8 mt-5">
<div class="icon-box">
<img src="static/images/step3.jpg" class="img-fluid
mx-auto d-block border" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
which looks like:
But on a phone screen, the text (Step 1 etc.) and images are stacked on top of each other. But because of the layout it does not alternate text-image-text-image-text-image as I would like it to:
How to I change the order on a phone screen but keep the desktop layout the way it is please?
My CSS is here also:
html {
font-size: 14px;
}
#media (min-width: 768px) {
html {
font-size: 16px;
}
}
body {
font-family: "PT Sans", sans-serif;
}
.container {
max-width: 960px;
}
.lh-condensed {
line-height: 1.25;
}
.main-header {
max-width: 700px;
}
.ofc-main-title {
font-family: "Lato", sans-serif;
font-weight: 900;
font-size: 40px;
}
.ofc-title {
font-family: "Lato", sans-serif;
font-weight: 900;
font-size: 24px;
}
a.ofc-link-title {
color: #000000;
text-decoration: none;
}
a.ofc-link-title:hover {
color: #000000;
}
a.ofc-link-title:active {
color: #000000;
}
a.ofc-link-title:visited {
color: #000000;
}
.ofc-main-subtitle {
font-family: "PT Sans", sans-serif;
font-weight: 400;
font-size: 24px;
}
.ofc-footer {
font-family: "Economica", sans-serif;
font-weight: 400;
font-size: 16px;
text-align: center;
}
form#main-search-form {
align-items: center;
justify-content: center;
}
span#main-beta-tag {
color: #FF1493;
font-size: 16px;
}
span#beta-tag {
color: #FF1493;
font-size: 12px;
}
#onboarding-title {
font-size: 24px;
}
.onboarding-panel {
background-color: #FBF7F0;
border-radius: 15px;
}
.onboarding-img {
width: 250px;
}
.onboarding-text {
font-weight: 900;
}
.step-panel {
background-color: #FFFFFF;
border-radius: 15px;
}
.step-text {
background-color: #FFFFFF;
width: 49%;
text-align: left;
display: inline-block;
padding: 30px;
font-size: 20px;
}
.step-img {
background-color: #FFFFFF;
width: 49%;
text-align: right;
display: inline-block;
padding: 20px;
}
span#looking-for {
color: #1C99CE;
}
#media(max-width:767px) {
.step-text {
width: 100%;
}
.step-img {
width: 100%;
}
.step-img {
width: 100% !important;
padding: 0px;
}
.step-img img {
width: 100% !important;
padding-top: 0px;
padding-bottom: 0px;
padding-right: 10px;
padding-left: 10px;
}
.step-text {
background: none;
}
.steps {
box-shadow: 0px 0px 1px 1px #d9d6d6;
}
.onboarding-panel .steps:first-child .step-text {
padding-bottom: 0px !important;
}
.step-img {
background: none !important;
}
.ofc-main-title {
font-size: 35px;
}
#search-form {
margin-top: 15px;
}
.border-bottom {
display: block !important;
text-align: center !important;
}
#search-form .btn {
margin-top: 10px !important;
padding-left: 20px;
padding-right: 20px
}
}
.icon-box {
margin: 0px 20px;
}
.icon-box p {
font-size: 18px;
}
I have added to your media query for #media (max-width: 767px) {} the order property of flex-box in a way the desired output is achieved.
html {
font-size: 14px;
}
#media (min-width: 768px) {
html {
font-size: 16px;
}
}
body {
font-family: "PT Sans", sans-serif;
}
.container {
max-width: 960px;
}
.lh-condensed {
line-height: 1.25;
}
.main-header {
max-width: 700px;
}
.ofc-main-title {
font-family: "Lato", sans-serif;
font-weight: 900;
font-size: 40px;
}
.ofc-title {
font-family: "Lato", sans-serif;
font-weight: 900;
font-size: 24px;
}
a.ofc-link-title {
color: #000000;
text-decoration: none;
}
a.ofc-link-title:hover {
color: #000000;
}
a.ofc-link-title:active {
color: #000000;
}
a.ofc-link-title:visited {
color: #000000;
}
.ofc-main-subtitle {
font-family: "PT Sans", sans-serif;
font-weight: 400;
font-size: 24px;
}
.ofc-footer {
font-family: "Economica", sans-serif;
font-weight: 400;
font-size: 16px;
text-align: center;
}
form#main-search-form {
align-items: center;
justify-content: center;
}
span#main-beta-tag {
color: #ff1493;
font-size: 16px;
}
span#beta-tag {
color: #ff1493;
font-size: 12px;
}
#onboarding-title {
font-size: 24px;
}
.onboarding-panel {
background-color: #fbf7f0;
border-radius: 15px;
}
.onboarding-img {
width: 250px;
}
.onboarding-text {
font-weight: 900;
}
.step-panel {
background-color: #ffffff;
border-radius: 15px;
}
.step-text {
background-color: #ffffff;
width: 49%;
text-align: left;
display: inline-block;
padding: 30px;
font-size: 20px;
}
.step-img {
background-color: #ffffff;
width: 49%;
text-align: right;
display: inline-block;
padding: 20px;
}
span#looking-for {
color: #1c99ce;
}
#media (max-width: 767px) {
.one {
order: 1;
}
.two {
order: 2;
}
.three {
order: 4;
}
.four {
order: 3;
}
.five {
order: 5;
}
.six {
order: 6;
}
.step-text {
width: 100%;
}
.step-img {
width: 100%;
}
.step-img {
width: 100% !important;
padding: 0px;
}
.step-img img {
width: 100% !important;
padding-top: 0px;
padding-bottom: 0px;
padding-right: 10px;
padding-left: 10px;
}
.step-text {
background: none;
}
.steps {
box-shadow: 0px 0px 1px 1px #d9d6d6;
}
.onboarding-panel .steps:first-child .step-text {
padding-bottom: 0px !important;
}
.step-img {
background: none !important;
}
.ofc-main-title {
font-size: 35px;
}
#search-form {
margin-top: 15px;
}
.border-bottom {
display: block !important;
text-align: center !important;
}
#search-form .btn {
margin-top: 10px !important;
padding-left: 20px;
padding-right: 20px;
}
}
.icon-box {
margin: 0px 20px;
}
.icon-box p {
font-size: 18px;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>JS Bin</title>
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="./style.css" />
</head>
<body>
<div class="container">
<div class="row text-center mb-4 mt-2">
<div class="col-md-12">
<div class="w-100 col-md-12 pb-4 pt-1 bg-light">
<div class="row align-items-center">
<div class="col-md-4 one">
<h4 class="font-weight-bold">Step 1:</h4>
<h5 class="pl-5 pr-5">
Search for people based on your keywords.
</h5>
</div>
<div class="col-md-8 mb-5 mt-4 two">
<div class="icon-box">
<img
src="static/images/step1.jpg"
class="img-fluid mx-auto d-block border"
alt="image-1"
/>
</div>
</div>
<div class="col-md-8 mt-5 mb-5 three">
<div class="icon-box">
<img
src="static/images/step2.jpg"
class="img-fluid mx-auto d-block border"
alt="image-2"
/>
</div>
</div>
<div class="col-md-4 four">
<h4 class="font-weight-bold">Step 2:</h4>
<h5 class="pl-5 pr-5">
The results are sorted by a person's responsiveness. Choose
from a\ list of matches who are ready and willing to interact.
</h5>
</div>
<div class="col-md-4 five">
<h4 class="font-weight-bold">Step 3:</h4>
<h5 class="pl-5 pr-5">
Message and make connections with people who are open for
(real or\ virtual) coffee!
</h5>
</div>
<div class="col-md-8 mt-5 six">
<div class="icon-box">
<img
src="static/images/step3.jpg"
class="img-fluid mx-auto d-block border"
alt="image-3"
/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script
src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"
></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"
></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"
></script>
<script src="./script.js"></script>
</body>
</html>
That's the beauty of order property in flexbox. It is very very helpful in these scenarios.
If i undrestand your question correctly you want to display text image , text image , text image from top to down in mobile screen?
first add a container for each row, something like this
<div class="row text-center mb-4 mt-2">
<div class="col-md-12">
<div class="w-100 col-md-12 pb-4 pt-1 bg-light">
<div class="row align-items-center">
<div class="row">
<div class="col-md-4">
<h4 class="font-weight-bold">Step 1:</h4>
<h5 class="pl-5 pr-5">Search for people based on your keywords.</h5>
</div>
<div class="col-md-8 mb-5 mt-4">
<div class="icon-box">
<img src="image1" class="img-fluid
mx-auto d-block border" />
</div>
</div>
</div>
<div class="row">
<div class="col-md-8 mt-5 mb-5">
<div class="icon-box">
<img src="image2" class="img-fluid
mx-auto d-block border" />
</div>
</div>
<div class="col-md-4">
<h4 class="font-weight-bold">Step 2:</h4>
<h5 class="pl-5 pr-5">The results are sorted by a person's responsiveness. Choose
from
a\
list of matches who are ready and willing to interact.</h5>
</div>
</div>
<div class="row">
<div class="col-md-4">
<h4 class="font-weight-bold">Step 3:</h4>
<h5 class="pl-5 pr-5">Message and make connections with people who are open for
(real
or\
virtual) coffee!</h5>
</div>
<div class="col-md-8 mt-5">
<div class="icon-box">
<img src="image3" class="img-fluid
mx-auto d-block border" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Then in when you are inside mobile mode add a class to the second container with this properties
.yourClass {
display: flex;
flex-direction: column-reverse;
}

Align button at bottom of floating div

I have an overview page with tiles and I use the matchheight library to dynamically determine the height of a row. Now I would like to align the 'more' buttons at the bottom of the div so that it doesn't look as messy as in the screenshot on smaller screens.
I tried making the button "position: absolute" with "bottom: 20px" and "left: 40%" but that causes problems with responsiveness. On some resolutions that's okay, but on other's the button is too far to the right.
Can I solve this in a nice way without having to use the media attribute for each resolution?
/* Block: Overview */
#overview {
padding-top: 50px;
width: 100%;
}
.overview {
text-align: center;
padding-bottom: 50px;
}
.overview img {
width: 100%;
vertical-align: middle;
padding-bottom: 30px;
}
.card-title {
text-align: center;
letter-spacing: -1px;
font-weight: 600;
font-size: 20px;
}
.card-subtitle {
margin-bottom: 0;
font-style: italic;
font-weight: 400;
font-size: 15px;
font-family: "Lora", serif;
color: #cccccc;
margin-top: -1rem;
line-height: 1.7857;
padding-bottom: 1rem;
text-align: center;
}
.btn-card {
background-color: #cccccc;
border-color: #404040;
color: #404040;
letter-spacing: 2px;
padding: 10px 20px;
horiz-align: center;
position: relative;
margin-bottom: 0;
}
.btn-card:hover {
background-color: #ffffff;
color: #404040;
border-color: #404040;
letter-spacing: 2px;
padding: 10px 20px;
}
<div class="col-sm-3 overview row-eq-height">
<div class="col-sm-12 text-center wow fadeInLeft">
<img alt="Heavy Entertainment Show" src="/images/discography/the-heavy-entertainment-show-1.jpg">
</div>
<h3 class="card-title">Heavy Entertainment Show</h3>
<h4 class="card-subtitle">November 4<sup>th</sup>, 2016</h4>
<a href="/album/the-heavy-entertainment-show/" title="Show details of Heavy Entertainment Show">
<button class="btn btn-card">MORE</button>
</a>
</div>
<div class="col-sm-3 overview row-eq-height">
<div class="col-sm-12 text-center wow fadeInLeft">
<img alt="Under the Radar Vol 1" src="/images/discography/under-the-radar-vol-1-1.jpg">
</div>
<h3 class="card-title">Under the Radar Vol 1</h3>
<h4 class="card-subtitle">December 1<sup>st</sup>, 2014</h4>
<a href="/album/under-the-radar-vol-1/" title="Show details of Under the Radar Vol 1">
<button class="btn btn-card">MORE</button>
</a>
</div>
<div class="col-sm-3 overview row-eq-height">
<div class="col-sm-12 text-center wow fadeInLeft">
<img alt="Swings Both Ways" src="/images/discography/swings-both-ways-1.jpg">
</div>
<h3 class="card-title">Swings Both Ways</h3>
<h4 class="card-subtitle">November 18<sup>th</sup>, 2013</h4>
<a href="/album/swings-both-ways/" title="Show details of Swings Both Ways">
<button class="btn btn-card">MORE</button>
</a>
</div>
<div class="col-sm-3 overview row-eq-height">
<div class="col-sm-12 text-center wow fadeInLeft">
<img alt="Take the Crown" src="/images/discography/take-the-crown-1.jpg">
</div>
<h3 class="card-title">Take the Crown</h3>
<h4 class="card-subtitle">November 2<sup>nd</sup>, 2012</h4>
<a href="/album/take-the-crown/" title="Show details of Take the Crown">
<button class="btn btn-card">MORE</button>
</a>
</div>
This is the correct solution, adding a "transform:translateX(-50%);" for alignment. Thanks for the help!
.btn-card {
background-color: #cccccc;
border-color: #404040;
color: #404040;
letter-spacing: 2px;
padding: 10px 20px;
position: absolute;
bottom: 0;
left: 50%;
transform:translateX(-50%);
margin-bottom: 20px;