This is what happend on my cards while having excess card in 1 row, I need it to be on the exact height and width even if different sizes of images. This is also in BOOTSTRAP 3
.card {
background-color: #fff;
border: 1px solid transparent;
border-radius: 6px;
}
.card>.card-link {
color: #333;
}
.card>.card-link:hover {
text-decoration: none;
}
.card>.card-link .card-img img {
border-radius: 6px 6px 0 0;
}
.card .card-img {
position: relative;
padding: 0;
display: table;
}
.card .card-img .card-caption {
position: absolute;
right: 0;
bottom: 16px;
left: 0;
}
.card .card-body {
display: table;
width: 100%;
padding: 12px;
}
.card .card-header {
border-radius: 6px 6px 0 0;
padding: 8px;
}
.card .card-footer {
border-radius: 0 0 6px 6px;
padding: 8px;
}
.card .card-left {
position: relative;
float: left;
padding: 0 0 8px 0;
}
.card .card-right {
position: relative;
float: left;
padding: 8px 0 0 0;
}
<div class="col-xs-6 col-sm-3">
<div class="card card-default">
<div class="card-img">
<img src="user_images/<?php echo $row['userPic'] ?>" alt="Card image" class="img-thumbnail" height="100">
</div>
<div class="card-body">
<p class="card-text" style="color:#00873a"><b><?php echo $cartname ?></b></p>
<p class="card-text" style="color:#e81b30"><strike style="color:#aaa">₱<?php echo $orig ?>.00</strike> ₱
<?php echo $cartprice ?>.00</p>
</div>
<div class="card-footer text-center">
<button type="button" class="btn btn-pink"><i class="fa fa-shopping-cart"></i> View Product </button></div>
</div>
</div>
I need to be on the same width and height so this not happen THANK YOUUU :(((
There are a few things you need to adjust. I have documented the changes in the source code.
The main container is changed into a flexbox. Since the default for flexbox items is stretch, all cards will have the same height.
Everything below the image is in a separate container and aligned to the bottom of the card.
/* Added */
.overview {
display: flex;
}
.card-default {
display: flex;
flex-wrap: wrap;
}
.card-default>* {
width: 100%;
}
.excludingImage {
align-self: flex-end;
text-align: center;
}
/* End Added */
.card {
background-color: #fff;
border: 1px solid transparent;
border-radius: 6px;
}
.card>.card-link {
color: #333;
}
.card>.card-link:hover {
text-decoration: none;
}
.card>.card-link .card-img img {
border-radius: 6px 6px 0 0;
}
/*
.card .card-img {
position: relative;
padding: 0;
display: table;
}
.card .card-img .card-caption {
position: absolute;
right: 0;
bottom: 16px;
left: 0;
}
*/
.card .card-body {
/* display: table;
width: 100%; */
padding: 12px;
}
.card .card-header {
border-radius: 6px 6px 0 0;
padding: 8px;
}
.card .card-footer {
border-radius: 0 0 6px 6px;
padding: 8px;
}
/*
.card .card-left {
position: relative;
float: left;
padding: 0 0 8px 0;
}
.card .card-right {
position: relative;
float: left;
padding: 8px 0 0 0;
}
*/
<link href="https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<!-- Class overview is added -->
<div class="col-xs-6 col-sm-3 overview">
<div class="card card-default">
<div class="card-img">
<img src="https://via.placeholder.com/120x100" alt="Card image" class="img-thumbnail" height="100">
</div>
<!-- Extra div added to enable alignment at bottom -->
<div class="excludingImage">
<div class="card-body">
<p class="card-text" style="color:#00873a"><b>Cart name</b></p>
<p class="card-text" style="color:#e81b30"><strike style="color:#aaa">₱100.00</strike> ₱100.00</p>
</div>
<div class="card-footer text-center">
<button type="button" class="btn btn-pink"><i class="fa fa-shopping-cart"></i> View Product </button></div>
</div>
</div>
<div class="card card-default">
<div class="card-img">
<img src="https://via.placeholder.com/120x150" alt="Card image" class="img-thumbnail" height="100">
</div>
<!-- Extra div added to align at bottom -->
<div class="excludingImage">
<div class="card-body">
<p class="card-text" style="color:#00873a"><b>Cart name</b></p>
<p class="card-text" style="color:#e81b30"><strike style="color:#aaa">₱100.00</strike> ₱100.00</p>
</div>
<div class="card-footer text-center">
<button type="button" class="btn btn-pink"><i class="fa fa-shopping-cart"></i> View Product </button></div>
</div>
</div>
</div>
You can use flexbox to achieve this add display:flex to parent div and check
check code snippet below using flexbox
.card-main {
display: flex;
}
<div class="card-main">
<div class="col-xs-6 col-sm-3">
<div class="card card-default">
<div class="card-img">
<img src="user_images/<?php echo $row['userPic'] ?>" alt="Card image" class="img-thumbnail" height="100">
</div>
<div class="card-body">
<p class="card-text" style="color:#00873a"><b><?php echo $cartname ?></b></p>
<p class="card-text" style="color:#e81b30"><strike style="color:#aaa">₱<?php echo $orig ?>.00</strike> ₱
<?php echo $cartprice ?>.00</p>
</div>
<div class="card-footer text-center">
<button type="button" class="btn btn-pink"><i class="fa fa-shopping-cart"></i> View Product </button></div>
</div>
</div>
<div class="col-xs-6 col-sm-3">
<div class="card card-default">
<div class="card-img">
<img src="user_images/<?php echo $row['userPic'] ?>" alt="Card image" class="img-thumbnail" height="100">
</div>
<div class="card-body">
<p class="card-text" style="color:#00873a"><b><?php echo $cartname ?></b></p>
<p class="card-text" style="color:#e81b30"><strike style="color:#aaa">₱<?php echo $orig ?>.00</strike> ₱
<?php echo $cartprice ?>.00</p>
</div>
<div class="card-footer text-center">
<button type="button" class="btn btn-pink"><i class="fa fa-shopping-cart"></i> View Product </button></div>
</div>
</div>
<div class="col-xs-6 col-sm-3">
<div class="card card-default">
<div class="card-img">
<img src="user_images/<?php echo $row['userPic'] ?>" alt="Card image" class="img-thumbnail" height="100">
</div>
<div class="card-body">
<p class="card-text" style="color:#00873a"><b><?php echo $cartname ?></b></p>
<p class="card-text" style="color:#e81b30"><strike style="color:#aaa">₱<?php echo $orig ?>.00</strike> ₱
<?php echo $cartprice ?>.00</p>
</div>
<div class="card-footer text-center">
<button type="button" class="btn btn-pink"><i class="fa fa-shopping-cart"></i> View Product </button></div>
</div>
</div>
</div>
Note: please change display:flex to display:block for responsive in media query:
Related
I am trying to get an SVG to go in the bottom right-hand corner of an image in a bootstrap card. I tried a solution similar to this: picture on the bottom right cornor of image but using the CSS for the icon makes my SVG disappear completely. I did not include the SVG tags in my code snippet because it was very long. But the full SVG I am using can be found here: https://communityloaves.org/wp-content/uploads/2022/03/breadherobadge.svg
Using the included code the cards look like this:
I would like them instead to have the SVG in the bottom right corner of the all green image. like in the second picture.
.image{
height:100%;
position:relative;
background-color:green;
background-size: cover;
background-image: url(https://communityloaves.org/wp-content/uploads/2021/05/Avatar-2-450x450.jpg);
}
.image .icon {
position:absolute;
bottom:0px;
right:0px;
}
p.dash-intro.nav-btns {
padding-top: 3rem;
}
.col-md-4.padding-1 {
padding-left: 5px;
padding-right: 5px;
}
.ann-text {
margin-bottom: 0px !important;
}
.ann-img {
max-height: 40rem;
}
.dash-intro {
color: black;
font-size: 18px;
margin-top: 35px;
}
.member-img {
max-height: 7rem;
margin-bottom: 6px;
padding-left: 15px;
}
p.card-text {
font-size: 11px;
padding: 9px 15px 9px 0px;
}
.special {
color: black;
font-size: 19px;
font-weight: bold;
}
.card-header {
padding: 0.75rem 1.25rem;
margin-bottom: 0;
background-color: #D4E1D4;
border-bottom: 1px solid rgba(0,0,0,0.125);
}
.hide {
display: none;
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<div class="container-fluid">
<br>
<hr>
<div class="row mt-3">
<div class="col-md-12">
<h4 class="font-weight-bold mb-3" id="members">Hub Members</h4>
</div>
</div>
<div class="row">
<div class="col-md-4 padding-1">
<div class="card border-success mb-5">
<div class="row g-2">
<div class="col-md-5 col-12 text-center padding-0">
<div class="image">
<div class="icon"><svg goes here. I didnt inlcude the full svg because it was too long> </div>
</div>
</div>
<div class="col-md-7 col-12 padding-0">
<p class="card-text">
<span class="font-weight-bold">Jane D <br></span>
<span class="font-weight-bold">Member Since: </span> Apr 13, 2022 <br>
<span class="font-weight-bold">First Donation: </span> Feb 27, 2022 <br>
<span class="email-text"><span class="font-weight-bold"><i class="fa fa-envelope"></i></span> janedoe#gmail.com</span>
<br><span class="font-weight-bold"><i class="fa fa-phone"></i></span> 555 555 555 (cell) <br><span class="font-weight-bold">Loaves to date: </span> 5
</p>
</div>
</div>
</div>
</div>
<div class="col-md-4 padding-1">
<div class="card border-success mb-5">
<div class="row g-2">
<div class="col-md-5 col-12 text-center padding-0">
<div class="image" stlye="background-image: url();">
<div class="icon">><svg goes here. I didnt inlcude the full svg because it was too long></div>
</div>
</div>
<div class="col-md-7 col-12 padding-0">
<p class="card-text">
<span class="font-weight-bold">Jane D <br></span>
<span class="font-weight-bold">Member Since: </span> Apr 13, 2022 <br>
<span class="font-weight-bold">First Donation: </span> Feb 27, 2022 <br>
<span class="email-text"><span class="font-weight-bold"><i class="fa fa-envelope"></i></span> janedoe#gmail.com</span>
<br><span class="font-weight-bold"><i class="fa fa-phone"></i></span> 555 555 555 (cell) <br><span class="font-weight-bold">Loaves to date: </span> 5
</p>
</div>
</div>
</div>
</div>
<div class="col-md-4 padding-1">
<div class="card border-success mb-5">
<div class="row g-2">
<div class="col-md-5 col-12 text-center padding-0">
<div class="image" stlye="background-image: url();">
<div class="icon">><svg goes here. I didnt inlcude the full svg because it was too long></div>
</div>
</div>
<div class="col-md-7 col-12 padding-0">
<p class="card-text">
<span class="font-weight-bold">Jane D <br></span>
<span class="font-weight-bold">Member Since: </span> Apr 13, 2022 <br>
<span class="font-weight-bold">First Donation: </span> Feb 27, 2022 <br>
<span class="email-text"><span class="font-weight-bold"><i class="fa fa-envelope"></i></span> janedoe#gmail.com</span>
<br><span class="font-weight-bold"><i class="fa fa-phone"></i></span> 555 555 555 (cell) <br><span class="font-weight-bold">Loaves to date: </span> 5
</p>
</div>
</div>
</div>
</div>
</div>
</div>
I add an image inside .icon class you can add your svg.
Basically you need to give parent class which is .icon a position:relative and your svg (child) position:absolute than you can play inside with
bottom, left, right and top properties which in this situation need
bottom:0;
right: 0;
Here is your code
*,
*::before,
*::after {
box-sizing: border-box;
}
.image{
height:100%;
position:relative;
background-color:green;
background-size: cover;
}
.image .icon {
position:relative;
width: 100%;
height: 100%;
}
.image .icon img{
position: absolute;
bottom:0;
right: 0;
border-radius: 100%;
width: 80px;
}
p.dash-intro.nav-btns {
padding-top: 3rem;
}
.col-md-4.padding-1 {
padding-left: 5px;
padding-right: 5px;
}
.ann-text {
margin-bottom: 0px !important;
}
.ann-img {
max-height: 40rem;
}
.dash-intro {
color: black;
font-size: 18px;
margin-top: 35px;
}
.member-img {
max-height: 7rem;
margin-bottom: 6px;
padding-left: 15px;
}
p.card-text {
font-size: 11px;
padding: 9px 15px 9px 0px;
}
.special {
color: black;
font-size: 19px;
font-weight: bold;
}
.card-header {
padding: 0.75rem 1.25rem;
margin-bottom: 0;
background-color: #D4E1D4;
border-bottom: 1px solid rgba(0,0,0,0.125);
}
.hide {
display: none;
}
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap#4.0.0/dist/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous"
/>
<div class="container-fluid">
<br />
<hr />
<div class="row mt-3">
<div class="col-md-12">
<h4 class="font-weight-bold mb-3" id="members">Hub Members</h4>
</div>
</div>
<div class="row">
<div class="col-md-4 padding-1">
<div class="card border-success mb-5">
<div class="row g-2">
<div class="col-md-5 col-12 text-center padding-0">
<div class="image">
<div class="icon">
<img
src="https://source.unsplash.com/random/100x100"
alt=""
/>
</div>
</div>
</div>
<div class="col-md-7 col-12 padding-0">
<p class="card-text">
<span class="font-weight-bold">Jane D <br /></span>
<span class="font-weight-bold">Member Since: </span> Apr 13,
2022 <br />
<span class="font-weight-bold">First Donation: </span> Feb 27,
2022 <br />
<span class="email-text"
><span class="font-weight-bold"
><i class="fa fa-envelope"></i
></span>
janedoe#gmail.com</span
>
<br /><span class="font-weight-bold"
><i class="fa fa-phone"></i
></span>
555 555 555 (cell) <br /><span class="font-weight-bold"
>Loaves to date:
</span>
5
</p>
</div>
</div>
</div>
</div>
</div>
</div>
I'm trying to create an E-commerce site, I have different categories(phone, computers, etc) and each category has a drop-down box.
My problem is displaying the drop-down contents outside its parent element and still be able to scroll horizontally(overflow-x : auto)
Each time I add an overflow-x:auto;, the drop down list becomes inside of the parent container.
.carte {
position: fixed;
top: 60px;
right: 0;
width: 100vw;
overflow-x: auto;
/*makes drop down boxes(.innerCart ) not visible*/
padding-bottom: 100px;
display: flex;
background: red;
z-index: 1;
}
.category {
position: absolute;
top: 60px;
padding: 5px 0;
margin: 0;
background: #fff;
border-bottom: 1px solid #A8A8A8;
border-radius: 0 0 0 5px;
display: flex;
justify-content: center;
overflow: visible;
}
.cart {
position: relative;
}
.outerCart {
padding: 10px;
margin: 0 7px;
border-radius: 5px;
cursor: pointer;
position: relative;
max-height: 100px;
overflow: hidden;
}
.innerCart {
display: none;
transition: 0.5s;
position: absolute;
top: 100px;
left: 50%;
transform: translate(-50%, 0);
background-color: #fff;
border-radius: 5px;
padding: 10px;
box-shadow: 0 0 10px #BABABA;
width: auto;
max-height: 300px;
overflow-y: auto;
}
.cart:hover .innerCart {
display: block;
}
.innerCart p:hover {
background: #f4f4f9;
color: rgb(59, 56, 56);
}
<div class="carte">
<div class="category" id="categorny">
<div class="cart">
<div class="outerCart">
<img src="/shop/images/phone-icon.png" class="phoneimage">
<p>Phones</p>
</div>
<div class="innerCart">
<p onclick="location.href='phones/android/index.html' ">Android</p>
<div class="line"></div>
<p onclick="location.href='phones/ios/index.html' ">IOS</p>
<div class="line"></div>
<p onclick="location.href='phones/accessories/index.html' ">Accessories</p>
</div>
</div>
<div class="cart">
<div class="outerCart">
<img src="<?php echo $stream?>/images/computer-icon.png" class="phoneimage">
<p>Computers</p>
</div>
<div class="innerCart">
<!-DROP DOWN CONTENT FOR COMPUTERS-->
</div>
</div>
<div class="cart">
<div class="outerCart">
<img src="<?php echo $stream?>/images/electronics-icon.png" class="electronicimage">
<p>Electronics</p>
</div>
<div class="innerCart">
<!-DROP DOWN CONTENT FOR ELECTRONICS-->
</div>
</div>
<div class="cart">
<div class="outerCart">
<img src="<?php echo $stream?>/images/fashion-icon.png" class="clothingimage">
<p>Fashion</p>
</div>
<div class="innerCart">
<!-DROP DOWN CONTENT FOR FASHION-->
</div>
</div>
<div class="cart">
<div class="outerCart">
<img src="<?php echo $stream?>/images/beauty-icon.png" class="clothingimage">
<p>Beauty</p>
</div>
<div class="innerCart">
<!-DROP DOWN CONTENT FOR BEAUTY-->
</div>
</div>
<div class="cart">
<div class="outerCart">
<img src="<?php echo $stream?>/images/vehicle-icon.png" class="vehicleimage">
<p>Vehicles</p>
</div>
<div class="innerCart">
<!-DROP DOWN CONTENT FOR VEHICLES-->
</div>
</div>
<div class="cart">
<div class="outerCart">
<img src="<?php echo $stream?>/images/service-icon.png" class="serviceimage">
<p>Services</p>
</div>
<div class="innerCart">
<!-DROP DOWN CONTENT FOR SERVICES-->
</div>
</div>
<div class="cart">
<div class="outerCart">
<img src="<?php echo $stream?>/images/house-icon.png" class="houseimage">
<p>Housing/property</p>
</div>
<div class="innerCart">
<!-DROP DOWN CONTENT FOR PROPERTY->
</div>
</div>
<div class="cart">
<div class="outerCart">
<img src="<?php echo $stream?>/images/food-icon.png" class="foodimage">
<p>Food/bakes</p>
</div>
<div class="innerCart">
<!-DROP DOWN CONTENT FOR FOODS->
</div>
</div>
<div class="cart">
<div class="outerCart">
<img src="<?php echo $stream?>/images/pet-icon.png" class="foodimage">
<p>Livestock/Pets</p>
</div>
<div class="innerCart">
<!-DROP DOWN CONTENT FOR PETS->
</div>
</div>
<i class="fa fa-arrow-right" id="arrow"></i>
</div>
</div>
I'm trying to make my main container slightly overlap on top of my jumbotron, I have tried messing with "my,mb,py,pb" but it doesn't cause an overlap
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1>Jumbotron H text</h1>
<p>Text</p>
</div>
</div>
<main role="main" class="container">
<div class="d-flex align-items-center p-3 my-3 text-white-50 bg-purple rounded box-shadow">
<div class="lh-100">
<h6 class="mb-0 text-white lh-100">
<?php
if(isset($_SESSION) && isset($_SESSION['login'])){ ?>
Welcome <?php echo $username; ?>
</h6>
<small>Since <?php echo $created; ?></small>
<?php }else{ ?>
Please Sign in or Register
<?php } ?>
</div>
</div>
I want the jumbotron to be the full horizontal width and the content to be about halfway over the jumbotron on top, I just tried the position absolute on the jumbotron like someone suggested however it just caused the jumbotron to be squished
If you want that <main role="main" class="top-5 container"> overlaps <div class="jumbotron jumbotron-fluid"> slightly you could add a negative margin-top to main.
main.negative-margin {
margin-top: -3rem;
}
/* the style form <!-- Custom styles for this template --> */
html,
body {
overflow-x: hidden; /* Prevent scroll on narrow devices */
}
body {
padding-top: 56px;
}
#media (max-width: 767.98px) {
.offcanvas-collapse {
position: fixed;
top: 56px; /* Height of navbar */
bottom: 0;
width: 100%;
padding-right: 1rem;
padding-left: 1rem;
overflow-y: auto;
background-color: var(--gray-dark);
transition: -webkit-transform .3s ease-in-out;
transition: transform .3s ease-in-out;
transition: transform .3s ease-in-out, -webkit-transform .3s ease-in-out;
-webkit-transform: translateX(100%);
transform: translateX(100%);
}
.offcanvas-collapse.open {
-webkit-transform: translateX(-1rem);
transform: translateX(-1rem); /* Account for horizontal padding on navbar */
}
}
.nav-scroller {
position: relative;
z-index: 2;
height: 2.75rem;
overflow-y: hidden;
}
.nav-scroller .nav {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
padding-bottom: 1rem;
margin-top: -1px;
overflow-x: auto;
color: rgba(255, 255, 255, .75);
text-align: center;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
}
.nav-underline .nav-link {
padding-top: .75rem;
padding-bottom: .75rem;
font-size: .875rem;
color: var(--secondary);
}
.nav-underline .nav-link:hover {
color: var(--blue);
}
.nav-underline .active {
font-weight: 500;
color: var(--gray-dark);
}
.text-white-50 { color: rgba(255, 255, 255, .5); }
.bg-purple { background-color: var(--purple); }
.border-bottom { border-bottom: 1px solid #e5e5e5; }
.box-shadow { box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); }
.lh-100 { line-height: 1; }
.lh-125 { line-height: 1.25; }
.lh-150 { line-height: 1.5; }
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1>Jumbotron H text</h1>
<p>Text</p>
</div>
</div>
<main role="main" class="top-5 container negative-margin">
<div class="d-flex align-items-center p-3 my-3 text-white-50 bg-purple rounded box-shadow">
<div class="lh-100">
<h6 class="mb-0 text-white lh-100">
Welcome
</h6>
<small>Since </small> Please Sign in or Register
</div>
</div>
<div class="content">
<div class="row">
<div class="col-12">
<div class="card card-chart">
<div class="card-header ">
<div class="row">
<div class="col-sm-6 text-left">
<h2 class="card-title">Servers</h2>
</div>
<div class="col-sm-6">
<div class="btn-group btn-group-toggle float-right" data-toggle="buttons">
<label class="btn btn-sm btn-primary btn-simple active" id="0">
<input type="radio" name="options" checked>
<span class="d-none d-sm-block d-md-block d-lg-block d-xl-block">Votes</span>
<span class="d-block d-sm-none">
<i class="tim-icons icon-single-02"></i>
</span>
</label>
<label class="btn btn-sm btn-primary btn-simple" id="1">
<input type="radio" class="d-none d-sm-none" name="options">
<span class="d-none d-sm-block d-md-block d-lg-block d-xl-block">PVP</span>
<span class="d-block d-sm-none">
<i class="tim-icons icon-gift-2"></i>
</span>
</label>
<label class="btn btn-sm btn-primary btn-simple" id="2">
<input type="radio" class="d-none" name="options">
<span class="d-none d-sm-block d-md-block d-lg-block d-xl-block">PVE</span>
<span class="d-block d-sm-none">
<i class="tim-icons icon-tap-02"></i>
</span>
</label>
</div>
</div>
</div>
</div>
<div class="card-body">
<div class="container">
<div class="container">
<div id="servers">
</div>
</div>
</div>
</div>
</div>
I am using Scss for styling the page and need to set scroll for specific parts of a HTML page.
when a user doing a scroll I need to keep the Categories(left) & Cart (Right) area to be strick in their position. But the center part needs to be scroll till the filtered items are reaching the top (bottom of the breadcrumb). If the user scroll further the filtered items will scroll underneath the filter and search bar section.
Can Anyone help me to fix it.
HTML :
<div class="container-fluid px-5">
<div class="row pt-4 pr-0">
<div class="col-sm-12 px-4 pt-2">
<app-gropcard-breadcrumb></app-gropcard-breadcrumb>
</div>
<div class="col-sm-12">
<div class="row">
<div class="col-sm-3">
<mat-card class="col-sm-12 p-0 mat-elevation-z10" style="background-color: #0084FF;color: white;">
<mat-card-header class="d-flex justify-content-center p-2">
<mat-card-title class="mb-0">Categories</mat-card-title>
</mat-card-header>
<mat-card-content>
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl" class="tree mt-3 pl-3 ">
<!-- This is the tree node template for leaf nodes -->
<mat-tree-node *matTreeNodeDef="let node" matTreeNodeToggle>
<li class="mat-tree-node">
<!-- use a disabled button to provide padding for tree leaf -->
<button class="TreeButton" mat-icon-button disabled></button>
<span (click)="Category(node)">{{node.name}}</span>
</li>
</mat-tree-node>
<!-- This is the tree node template for expandable nodes -->
<mat-nested-tree-node *matTreeNodeDef="let node; when: hasChild">
<li>
<div class="mat-tree-node" [attr.aria-label]="'toggle ' + node.name">
<button class="TreeButton" mat-icon-button matTreeNodeToggle
[attr.aria-label]="'toggle ' + node.name">
<mat-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-icon>
</button>
<span matTreeNodeToggle (click)="Category(node)">{{node.name}}</span>
</div>
<ul class="pl-2" [class.tree-invisible]="!treeControl.isExpanded(node)">
<ng-container matTreeNodeOutlet></ng-container>
</ul>
</li>
</mat-nested-tree-node>
</mat-tree>
</mat-card-content>
</mat-card>
</div>
<div class="col-sm-6 containerbackground">
<div class="col-sm-12 p-0 d-flex justify-content-center">
<img class="w-100 banner"
[src]="mListedPartyBanner">
</div>
<div class="col-sm-12">
<div class="row">
<div class="col-sm-3">
<div class="row">
<h5 class="mt-4 mb-2">Filtered Items</h5>
</div>
</div>
<div class="col-sm-5 search pt-4" fxShow="true" fxHide.gt-sm="false">
<form class="search" >
<mat-form-field class="w-100" appearance="outline">
<input type="text" #myInput matInput placeholder="Search" maxlength="50" (input)="Search(myInput.value)" autocomplete='null' [formControl]="myControl">
<button matTooltip="Search" matSuffix mat-icon-button>
<mat-icon>
search
</mat-icon>
</button>
</mat-form-field>
</form>
</div>
<div class="col-sm-4 d-flex justify-content-end">
<div class="View mt-4 mb-2 mr-4">
<div class="row">
<button matTooltip="Filter"[matMenuTriggerFor]="menu" mat-icon-button>
<mat-icon>filter_list</mat-icon>
</button>
<mat-menu #menu="matMenu">
<button (click)="sortBy(data?.id)" mat-menu-item *ngFor="let data of sortList" [value]="data?.id">
<span>{{data?.value}}</span>
</button>
</mat-menu>
<button [ngClass]="{'ActiveButton': displayMode === 1}" (click)="onDisplayModeChange(1)"
matTooltip="List view" mat-icon-button>
<mat-icon>view_headline</mat-icon>
</button>
<button [ngClass]="{'ActiveButton': displayMode === 2}" (click)="onDisplayModeChange(2)"
matTooltip="Grid view" mat-icon-button>
<mat-icon>view_module</mat-icon>
</button>
</div>
</div>
</div>
</div>
</div>
<hr>
<div class="col-sm-12" *ngIf='displayMode==1'>
<div class="row d-flex justify-content-center">
<div class="col-sm-6 p-2 " *ngFor="let prod of ListedPartyItems; let ind = index">
<mat-card class="py-1" matRipple>
<div class="corner-ribbon top-right sticky blue shadow" *ngIf='prod?.PROMO_PRICE'>
{{((prod?.PRODUCT_PRICE-prod?.PROMO_PRICE)/prod?.PRODUCT_PRICE)*100 | number: '1.0-0'}}% Off</div>
<div class="row">
<div class="ImageDiv">
<img class="w-100 Img p-1" [src]="prod['IMAGE_PATH_1']">
</div>
<div class="row NameDiv d-flex ProductData justify-content-center">
<div class="Name mt-2">
<span>{{prod?.ITEM_DESCRIPTION}}</span>
</div>
<div class="Price mt-2">
<span class="ProductPrice">{{prod?.PROMO_PRICE ? (prod?.PROMO_PRICE | number:'.1-2') :
(prod?.PRODUCT_PRICE | number:'.1-2')}}<span class="pl-1"
[innerHtml]="mCurrencyCode"></span></span>
<span class="PromotionPrice mt-1 pl-1" *ngIf='prod?.PROMO_PRICE'>{{prod?.PRODUCT_PRICE |
number:'.1-2'}}<span class="pl-1" [innerHtml]="mCurrencyCode"></span></span>
</div>
<div class="col-sm-12">
<div class="row">
<div class="d-flex justify-content-center mt-2 w-100">
<button type="button" (click)="Decrement( ind)" class="btnStyles">–</button>
<input type="text" readonly class="quantityBox" [(ngModel)]="prod.qty">
<button type="button" (click)="Increment(ind)" class="btnStyles">+</button>
</div>
<div class="col-sm-12 mt-2 d-flex justify-content-center">
<div class="row">
<div class="col-sm-6">
<button (click)="AddToCart(prod?.PRODUCT_CODE,prod?.UOM,prod?.qty, ind)"
class="col-sm-12 ProductButton " mat-raised-button>
<mat-icon class="iconSize Cursor">shopping_cart</mat-icon>
</button>
</div>
<div class="col-sm-6">
<button (click)="SelectedProduct(prod?.PRODUCT_CODE)" class="col-sm-12 ProductButton"
mat-raised-button>More</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</mat-card>
</div>
</div>
</div>
<div class="col-sm-12" *ngIf='displayMode==2'>
<div class="row">
<div *ngIf="IsItemFound" style="display:block;margin:auto;">
<img src="../../../../assets/oops.png" alt="">
</div>
<div class="col-sm-4 p-2" *ngFor="let prod of ListedPartyItems; let ind = index">
<mat-card matRipple class="p-0 ">
<div class="corner-ribbon top-right sticky blue shadow" *ngIf='prod?.PROMO_PRICE'>
{{((prod?.PRODUCT_PRICE-prod?.PROMO_PRICE)/prod?.PRODUCT_PRICE)*100 | number: '1.0-0'}}% Off</div>
<img class="d-block w-100 Img p-1" [src]="prod['IMAGE_PATH_1']">
<div class="w-100 d-flex ProductData justify-content-center">{{prod?.ITEM_DESCRIPTION}}</div>
<div class="col-sm-12 mt-2 d-flex justify-content-center">
<span class="ProductPrice">{{prod?.PROMO_PRICE ? (prod?.PROMO_PRICE | number:'.1-2') :
(prod?.PRODUCT_PRICE | number:'.1-2')}}<span class="pl-1"
[innerHtml]="mCurrencyCode"></span></span>
<span class="PromotionPrice mt-1 pl-1" *ngIf='prod?.PROMO_PRICE'>{{prod?.PRODUCT_PRICE |
number:'.1-2'}}<span class="pl-1" [innerHtml]="mCurrencyCode"></span></span>
</div>
<div class="d-flex justify-content-center mt-2">
<button type="button" (click)="Decrement( ind)" class="btnStyles">–</button>
<input type="text" readonly class="quantityBox" [(ngModel)]="prod.qty">
<button type="button" (click)="Increment(ind)" class="btnStyles">+</button>
</div>
<div class="w-100 mt-2">
<div class="row">
<div class="w-50 ">
<button (click)="AddToCart(prod?.PRODUCT_CODE,prod?.UOM,prod?.qty, ind)"
class="col-sm-12 ProductButton p-0" mat-raised-button>Add To Cart</button>
</div>
<div class="w-50">
<button (click)="SelectedProduct(prod?.PRODUCT_CODE)" class="col-sm-12 ProductButton p-0"
mat-raised-button>More</button>
</div>
</div>
</div>
</mat-card>
</div>
</div>
</div>
</div>
<div class="col-sm-3">
<mat-card class="col-sm-12 p-0 mat-elevation-z10 YourCartheight">
<mat-card-header class="d-flex justify-content-center p-2" style="background-color: #0084FF;color: white;">
<mat-card-title class="mb-0">Your Cart</mat-card-title>
</mat-card-header>
<mat-card-content>
<div class="col-sm-12" *ngIf="!IsMyCartHasItems">
<div class="row">
<div class="col-sm-12 d-flex justify-content-center mt-4">
<img class="d-block w-100 emptycart p-1" src="../../../../../assets/cart.png" alt="No Data">
</div>
<div class="col-sm-12 pb-4 d-flex justify-content-center">
<span>There are no items in your cart.</span>
</div>
</div>
</div>
<div class="col-sm-12 p-2" *ngIf="IsMyCartHasItems">
<div class="row" *ngFor="let prod of MyCart; let i = index">
<div class="col-sm-4 p-2">
<div class="col-sm-12 p-2">
<span style="font-size: 12px;">{{prod.ITEM_DESC}}</span>
</div>
</div>
<div class="col-sm-4 p-0 d-flex justify-content-center">
<div class="col-sm-12 p-2 mt-2">
<button type="button" (click)="Decrementsub(prod?.ITEM_CODE,prod?.ITEM_PACK_SIZE,prod?.TOTAL_QTY,i)" class="cartBtn">–</button>
<input type="text" readonly class="quantityBox1" [value]="prod.TOTAL_QTY">
<button type="button" (click)="Incrementsub(prod?.ITEM_CODE,prod?.ITEM_PACK_SIZE,prod?.TOTAL_QTY,i)" class="cartBtn">+</button>
</div>
</div>
<div class="col-sm-2 p-0 d-flex justify-content-center">
<div class="col-sm-12 p-2 mt-2">
<span>{{prod?.TOTAL_AMT | number}} <span class="pl-1 Price"
[innerHtml]="mCurrencyCode"></span></span>
</div>
</div>
<div class="col-sm-2 p-0 d-flex justify-content-center">
<div class="col-sm-12 p-1">
<button matTooltip="Remove"
(click)="RemoveCartProduct(prod?.ITEM_CODE,prod?.ITEM_PACK_SIZE)" mat-icon-button
color="warn">
<mat-icon>delete</mat-icon>
</button>
</div>
</div>
</div>
<div class="col-sm-12 p-0 d-flex justify-content-center">
<button (click)='GoToCheckout()' class="col-sm-12 p-0 checkout" color="warn" mat-raised-button>CHECK
OUT <strong *ngIf='mCartCount > 0' class="pl-4" style="font-size: 20px;">{{TotalAmount | number}}<span class="pl-1 Price"
[innerHtml]="mCurrencyCode"></span></strong></button>
</div>
</div>
</mat-card-content>
</mat-card>
</div>
</div>
</div>
</div>
</div>
SCSS:
.Img{
height: 200px;
#include desktop{
height: 250px;
}
}
.Caption{
font-size: 1em;
font-weight: bold;
#include desktop{
font-size: 1.5em;
}
}
.ProductButton{
background-color: color(messengerBlue);
color: color(basic);
font-weight: bold;
font-size: 1em;
border-radius: 0;
margin-left: 10px;
}
.ProductData{
font-weight: lighter;
font-size: 12px !important;
white-space: normal;
word-wrap: break-word;
color: color(gray);
}
.containerbackground{
background-color:#f1f3f6;
}
.ActiveButton{
background-color: color(primary);
color: color(basic);
}
// Change text colour when inputting text
.search {
//-----Input Field Size----------
::ng-deep .mat-form-field-flex > .mat-form-field-infix {
padding: 0.4em 0px !important;
// padding-bottom: 8px !important;
}
::ng-deep .mat-form-field-label-wrapper {
top: -1.5em;
}
::ng-deep
.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float
.mat-form-field-label {
transform: translateY(-1.1em) scale(0.75);
width: 133.33333%;
}
::ng-deep .mat-form-field {
background-color: white;
::ng-deep .mat-form-field-wrapper {
padding-bottom: 0;
}
::ng-deep .mat-form-field-wrapper {
margin: 0 0;
}
::ng-deep .mat-form-field-outline-start,
.mat-form-field-outline-end {
border-radius: 0 !important;
}
// ::ng-deep .mat-form-field-underline {
// height: 0px;
// }
// ::ng-deep .mat-form-field-infix {
// padding-top: 0px;
// position: relative;
// }
.mat-form-field-underline {
background-color: transparent;
}
.mat-form-field-ripple {
background-color: transparent;
}
}
}
.tree-invisible {
display: none;
}
.tree ul,
.tree li {
margin-top: 0;
margin-bottom: 0;
list-style-type: none;
cursor: pointer;
}
.mat-tree-node {
min-height: 0px;
max-height: 30px;
.TreeButton{
outline: none;
}
}
.Title{
font-size: 1.5em;
font-weight: bold;
}
.banner{
height: 250px;
}
.ImageDiv{
width: 40%;
}
.Img{
height: 130px;
#include desktop{
height: 150px;
}
}
.NameDiv{
width: 60%;
.Name{
width: 100%;
text-align: center;
font-weight: lighter;
font-size: 12px !important;
white-space: normal;
word-wrap: break-word;
color: color(gray);
}
.Price{
width: 100%;
font-weight: bold;
font-size: 1.5em;
color: color(primary);
text-align: center;
}
}
.imgButton{
background-color: color(messengerBlue);
color: color(basic);
font-weight: bold;
font-size: 1em;
border-radius: 0;
}
.btnStyles{
width: 28px;
height: 28px;
background: linear-gradient(#fff, #f9f9f9);
display: inline-block;
border: 1px solid #c2c2c2;
cursor: pointer;
font-size: 16px;
border-radius: 50%;
padding-top: 1px;
line-height: 1;
}
.cartBtn{
width: 20px;
height: 20px;
background: linear-gradient(#fff, #f9f9f9);
display: inline-block;
border: 1px solid #c2c2c2;
cursor: pointer;
font-size: 12px;
border-radius: 50%;
padding-top: 1px;
line-height: 1;
}
.quantityBox{
display: inline-block;
padding: 3px 6px;
width: calc(100% - 60px);
height: 100%;
width: 46px;
height: 28px;
border-radius: 2px;
background-color: #fff;
border: 1px solid #c2c2c2;
margin: 0 9px;
font-weight: bold;
text-align: center
}
.quantityBox1{
display: inline-block;
padding: 3px 6px;
width: calc(100% - 60px);
height: 100%;
width: 25px;
height: 20px;
border-radius: 2px;
background-color: #fff;
border: 1px solid #c2c2c2;
margin: 0 9px;
font-weight: bold;
text-align: center
}
.iconSize {
font-size: 30px;
}
.cursor {
cursor: pointer;
}
.ItemPromotionPrice {
display: inline-block;
text-decoration: line-through;
opacity: .5;
font-size: 20px !important;
color: color(gray);
}
.ProductPrice{
font-weight: bold;
font-size: 1em;
color: color(primary);
}
::ng-deep .mat-form-field {
font-size: 12px; // example
}
.emptycart{
height: 100px !important;
width: 100px !important;
}
.YourCartheight{
min-height: 150px!important;
max-height:500px !important;
}
I have a suggestion to use html:not
It should be looked like this:
html:not([data-scroll='0']) /*class name for category section*/ {
position: fixed;
top: 0;
}
In order to make the middle container's content scroll, it must first overflow. That can be achieved by applying either a fixed or max height. Then you need to specify the overflow behaviour:
.containerbackground {
background-color:#f1f3f6;
max-height: 100vh;
overflow-y: auto;
}
I am trying to build a static web page as a part of a bigger project (the project is in Laravel).
Everything seems to work fine except for the footer that is behaving unusually.
Despite being at the bottom of the HTML tree, it tends to occupy much more space, overlapping many of the elements above it.
I have already tried changing the div (footer) to the 'footer' element and then to a 'section' element but to no avail.
My HTML file :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Medical Insurance</title>
<link rel="stylesheet" type="text/css" href="{{ asset('web/css/medicalInsuranceStyles.css') }}">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<div class="container-fluid">
<!-- header -->
<div class="row">
<div class="col-xs-4 col-sm-4 col-md-offset-1 col-md-3">
<a href="https://www.letsmd.com/">
<img id='main-logo' src="<?php echo e(asset('/web/images/logo-without-Tagline.svg')); ?>">
</a>
</div>
</div>
<!-- banner -->
<div id='banner-container'>
<div id="transparent-div"></div>
<div id='banner-text-div'>
<h1>Smart Health Insurance Cover</h1>
<h2>Starting from ₹5/day</h2>
</div>
</div>
<!-- content part one -->
<div>
<div class='col-md-12 col-sm-12 col-xs-12' id="content-div-one">
<h2>Same premium, <span id='content-div-one-span'>2x</span> the value</h2>
<button class="btn btn-default">Apply Now</button>
</div>
</div>
<!-- content part two -->
<div>
<div class='col-md-offset-1 col-md-10 col-sm-offset-1 col-sm-10 col-xs-12' id="content-div-two">
<h2><span>CARE COVER</span> PLAN</h2>
<p>Ensures affordable, comprehensive cover</p>
<ul>
<li>Coverage for family</li>
<li>Covers everything under a standard health policy</li>
<li>Sum Insured options upto 5lacs with deductibles</li>
<li>Sum Insured on family floater basis</li>
<li>Hospitalisation expenses + pre - post hospitalisation covered</li>
<li>All room/ICU/nursing/medicine/surgery etc charges covered</li>
<li>Day care procedures covered</li>
<li>Coverage available at all leading hospitals across the country</li>
<li>Deductible 50,000/100,000 options available. Deductible finances at 0% EMI</li>
<li>Tax benifits under section 80D</li>
</ul>
</div>
</div>
<!-- form -->
<div>
<div class='col-md-12 col-sm-12 col-xs-12' id="form-div">
<h2><span>GET</span> QUOTE</h2>
<form action="" method="POST">
<div id="form">
<section id="form-section-one">
<p>Enter Your Name</p>
<input type="text" name="name">
<p>Your Mobile No.</p>
<input type="number" name="number">
<p>Email-Id</p>
<input type="email" name="email">
</section>
<section id="form-section-two">
<p>Gender</p>
<input type="radio" name="gender" value='female'><span>Female</span>
<input type="radio" name="gender" value='male'><span>Male</span>
<input type="radio" name="gender" value='others'><span>Others</span>
<p>Source of Income</p>
<select name="income-source" id="">
<option value="" selected disabled>-- Select One --</option>
<option value="">alpha</option>
<option value="">beta</option>
<option value="">gamma</option>
</select>
<p>Annual Income/Salary</p>
<input type="number" name="salary">
</section>
<section id="form-section-three">
<p>Our team will get in touch with you for further processing</p>
<p>Please select the number of family members you want to get insured with you</p>
<select name="family-memers" id="">
<option value="" selected disabled>-- Select One --</option>
<option value="">alpha</option>
<option value="">beta</option>
<option value="">gamma</option>
</select>
<p id='greeting-text'>Thank You</p>
</section>
</div>
<button class="btn btn-default" id='form-btn'>Next</button>
</form>
</div>
</div>
<!-- video -->
<!-- <div>
<div class='col-md-offset-1 col-md-10 col-sm-offset-1 col-sm-10 col-xs-12' id="video-div">
<video width="400" controls>
<source src="mov_bbb.mp4" type="video/mp4">
<source src="mov_bbb.ogg" type="video/ogg">
Your browser does not support HTML5 video.
</video>
</div>
</div> -->
<!-- media mentions -->
<div class='col-md-offset-1 col-md-10 col-sm-offset-1 col-sm-10 col-xs-12' id="media-mentions-div">
<h2><span>MEDIA</span> MENTIONS</h2>
<div class="row">
<div class="col-md-offset-2 col-md-2 col-sm-offset-2 col-sm-2 col-xs-3">
<img class="img-responsive" src="<?php echo e(asset('/web/loancard/Media/2017.10.06_09-23-18bhaskar.png')); ?>">
</div>
<div class="col-md-2 col-sm-2 col-xs-3">
<img class="img-responsive" class="img-responsive"src="<?php echo e(asset('/web/loancard/Media/vccircle.png')); ?>">
</div>
<div class="col-md-2 col-sm-2 col-xs-3">
<img class="img-responsive" src="<?php echo e(asset('/web/loancard/Media/TheHindu-Logo.png')); ?>">
</div>
<div class="col-md-2 col-sm-2 col-xs-3">
<img class="img-responsive" src="<?php echo e(asset('/web/loancard/Media/Zee-Business-CS6-1110x550.png')); ?>">
</div>
</div>
<div class="row">
<div class="col-md-offset-2 col-md-2 col-sm-offset-2 col-sm-2 col-xs-3">
<img class="img-responsive" src="<?php echo e(asset('/web/loancard/Media/dribbble_001_2x.png')); ?>">
</div>
<div class="col-md-2 col-sm-2 col-xs-3">
<img class="img-responsive" src="<?php echo e(asset('/web/loancard/Media/the-economic-times-logo-png-1.png')); ?>" >
</div>
<div class="col-md-2 col-sm-2 col-xs-3">
<img class="img-responsive" src="<?php echo e(asset('/web/loancard/Media/yahoo-logo-png-transparent-background-768x256.png')); ?>">
</div>
<div class="col-md-2 col-sm-2 col-xs-3">
<img class="img-responsive" src="<?php echo e(asset('/web/loancard/Media/yourstory.png')); ?>">
</div>
</div>
</div>
<!-- footer -->
<div class="row" id='footer'>
<div class="col-md-5 col-sm-5 col-xs-5 pull-left">
<p>Copyright © {{ date('Y') }} LetsMD. All rights reserved </p>
</div>
<div class="col-md-offset-1 col-md-6 col-sm-offset-1 col-sm-6 col-xs-6 pull-right">
<p>
Get social with us
<a href="https://www.facebook.com/LetsMDMedbay/" target="_blank">
<span class="fa-stack fa-md">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
</span>
</a>
<a href="https://www.youtube.com/channel/UC4urUJpHcA9LpeRQ1O2hdjw" target="_blank">
<span class="fa-stack fa-md">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-youtube-play fa-stack-1x fa-inverse"></i>
</span>
</a>
<a href="https://in.linkedin.com/company/letsmd" target="_blank">
<span class="fa-stack fa-md">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-linkedin fa-stack-1x fa-inverse"></i>
</span>
</a>
</p>
</div>
</div>
</div>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<script src="{{ asset('web/js/medicalInsuranceScript.js') }}"></script>
</html>
My CSS file :
#main-logo {
width: 50%;
margin-top: 5%;
}
#transparent-div {
width: 70%;
margin: 0 auto;
background: black;
opacity: 0.7;
color: white;
padding: 10px 50px;
min-height: 200px;
}
#content-div-one {
color: #E97C2B;
background: #f1efef;
text-align: center;
min-height: 300px;
}
#content-div-one button {
color: white;
background-image: linear-gradient(to right, #105e7b , #44b649);
box-shadow: 3px 3px 6px black;
border: none;
font-size: 170%;
font-weight: bold;
padding: 10px 20px;
}
#content-div-one button:hover {
font-size: 175%;
transition: all 0.2s;
box-shadow: 6px 6px 6px black;
}
#content-div-one button:focus {
outline:0;
}
.container-fluid {
margin: 0 !important;
padding: 0 !important;
}
#banner-container {
background-image: url('/images/family.jpg');
background-size: cover;
min-height: 500px !important;
padding-top: 20%;
position: relative;
}
#banner-text-div {
color: white;
margin: 0 auto;
width: 70% !important;
text-align: center;
position: absolute;
left: 15%;
bottom: 14%;
}
#banner-text-div h1 {
font-size: 400%;
font-weight: bolder;
font-style: italic;
}
#banner-text-div h2 {
font-size: 340%
}
#content-div-one h2 {
font-size: 300%;
font-weight: bold;
margin-top: 5%;
}
#content-div-one-span {
font-size: 300%;
}
#content-div-two h2 {
text-align: center;
color: #59A553;
margin-top: 8%;
}
#content-div-two p {
text-align: center;
color: #306577;
font-size: 150%;
/*margin-bottom: 6%;*/
}
#content-div-two h2 span {
font-weight: bolder;
}
#content-div-two ul {
color: #306577;
font-size: 150%;
margin: 5% 10%;
line-height: 200%;
}
#form-div {
background: #f1efef;
}
#form-div h2, #media-mentions-div h2 {
text-align: center;
color: #59A553;
margin-top: 10%;
margin-bottom: 5%;
}
#form-div h2 span, #media-mentions-div h2 span {
font-weight: bolder;
}
#form {
background: white;
padding: 5%;
box-shadow: 1px 1px 10px black;
width: 50% !important;
margin: 0 auto;
}
#form section p {
font-size: 150%;
color: #306577;
margin-top: 10%;
}
#form section select, #form section input[type='text'], #form section input[type='number'], #form section input[type='email'] {
width: 100%;
border: 2px solid #306577;
background: #f1efef;
font-size: 175%;
margin-bottom: 5%
}
#form section select {
height: 45px !important;
}
#form-btn {
width: 50%;
margin: 5% 25%;
text-align: center;
color: white;
background-image: linear-gradient(to right, #105e7b , #44b649);
box-shadow: 3px 3px 6px black;
border: none;
font-size: 170% !important;
font-weight: bold;
padding: 10px 20px;
margin-bottom: 10%;
}
#form-btn:hover {
font-size: 175%;
transition: all 0.2s;
box-shadow: 6px 6px 6px black;
}
#form section input[type='radio'] {
margin: 0px 10px;
}
#form-section-two span {
margin-right: 10%;
font-size: 120%;
}
#form-section-three p:first-child {
color: #E97C2B;
}
#greeting-text {
font-style: italic;
text-align: center;
font-size: 200% !important;
}
#media-mentions-div {
margin-bottom: 8%;
}
#footer {
background: grey;
color: white;
}
My JS file :
var sectionNumber = 2;
function toggleForm() {
if (sectionNumber === 0) {
$('#form-section-one').css('display','block');
$('#form-section-two').css('display','none');
$('#form-section-three').css('display','none');
}
else if (sectionNumber === 1) {
$('#form-section-one').css('display','none');
$('#form-section-two').css('display','block');
$('#form-section-three').css('display','none');
}
else if (sectionNumber === 2) {
$('#form-section-one').css('display','none');
$('#form-section-two').css('display','none');
$('#form-section-three').css('display','block');
}
else {
}
}
toggleForm();
What I expect (as stated) is that the footer should come at the bottom of the page and not overlap the elements above it.
What I expect :
What I'm getting :
Thank You
Add a wrapper row for the content above footer section
Check this fiddle
<div class="row">
<div class='col-md-offset-1 col-md-10 col-sm-offset-1 col-sm-10 col-xs-12'
id="media-mentions-div"></div>
</div>