I have a section of a site that uses an h2, followed by an accordion. I am trying to have the accordion and h2 pull-left, however the accordion is the wrong size, unless it is expanded in which it enlarges itself. I have a sidebar column set up as so: <div class="col-md-3">
thus I want the h2, and accordion to be to the right of that but take up the full screen on the right of that. My accordion and h2 is set up as follows:
<div class="col-md-9 pull-right">
<div class="panel-body">
<h2 class="page-header col-md-9 pull-left">Action Strategies: What We Can Do Now</h2>
<div class="panel-group col-md-9 pull-left" id="accordion">
with each panel like so:
<!-- /.panel -->
<div class="panel panel-default">
<div class="panel-heading teachers">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">Teachers and Support Staff</a>
</h4>
</div>
<div id="collapseTwo" class="panel-collapse collapse">
<div class="panel-body">
<!-- content -->
</div>
</div>
</div>
As I understood your problem, pull-right is causing it. Please see the attached snippets if this is was you need.
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div class="container">
<div class="col-md-3">
<h3>Sidebar</h3>
<div>Lorem ipsum dolor sit amet consectetur adipisicing elit. Porro esse officiis ipsa, placeat praesentium laborum rerum iste aspernatur omnis ratione exercitationem eligendi. Soluta id ipsa nisi ex! Cumque, voluptatum laudantium hic, ea cum, vitae aperiam expedita delectus autem iusto nam voluptatem dolorum fugiat? Laudantium minima, eos eius harum voluptatem error!</div>
</div>
<div class="col-md-9">
<div class="row">
<div class="col-md-12">
<h2 class="page-header col-md-9 pull-left">Action Strategies: What We Can Do Now</h2>
</div>
</div>
<div class="panel-group " id="accordion">
<div class="panel panel-default">
<div class="panel-heading teachers">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapse1">Teachers and Support Staff 1</a>
</h4>
</div>
<div id="collapse1" class="panel-collapse collapse">
<div class="panel-body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos architecto atque nemo nisi explicabo dolor. Magni perferendis modi vero pariatur officia consectetur, vitae id. Aspernatur officia nam ipsum ea dolorum laborum error maxime quidem provident rerum facere eum, unde? Ducimus quos provident adipisci, odit porro itaque eligendi beatae obcaecati tenetur minima officiis libero, nesciunt quidem autem ex cupiditate ratione veniam repellat est consequuntur quibusdam aut suscipit at. Provident quod, dolor quae incidunt vitae non neque, molestiae minus veritatis deleniti eligendi laboriosam blanditiis nostrum eum quia qui voluptas nemo expedita aliquam dolorum nihil. Quas dolor neque voluptatibus quos optio reprehenderit, impedit?
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading teachers">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapse2">Teachers and Support Staff 2</a>
</h4>
</div>
<div id="collapse2" class="panel-collapse collapse">
<div class="panel-body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Qui ex laboriosam libero suscipit natus, voluptatibus, perferendis eos omnis impedit minima fugit a ipsum ipsa rem numquam placeat provident magnam asperiores mollitia vero magni laudantium pariatur. Obcaecati error rem dolor itaque quidem eligendi, voluptas vero voluptatem, labore adipisci perferendis quia velit reiciendis illo libero optio. Aliquam autem labore voluptas veritatis praesentium, in a tempore accusamus error ad laboriosam omnis consequuntur, pariatur dolor voluptates dolores vel. Repellat animi tenetur expedita nobis est a natus hic adipisci eligendi aliquam quo minus, dolorum nihil provident odit delectus suscipit omnis nostrum quod magni, voluptatum. Laboriosam!
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading teachers">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapse3">Teachers and Support Staff 3</a>
</h4>
</div>
<div id="collapse3" class="panel-collapse collapse">
<div class="panel-body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Obcaecati, voluptatem, itaque cumque dolorem dicta eveniet porro voluptatibus unde ad nostrum est accusantium veniam, iste natus incidunt quis consectetur quod placeat deserunt corporis veritatis quidem! Eaque facilis quasi, rem reiciendis! Voluptatibus quasi, necessitatibus repellendus impedit, fugit minima vero eius, perferendis dignissimos vel nulla velit! Error commodi veniam maxime reprehenderit aut sint voluptatem id culpa autem corrupti optio expedita blanditiis odit dolorem obcaecati vitae delectus ea necessitatibus beatae laboriosam aliquid, eos eveniet nobis quos quidem? Quia itaque dicta quasi perferendis earum, fuga illo aperiam architecto nisi iure suscipit omnis esse facilis, saepe.
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Related
<div class="box-2">
<div class="row">
<div class="col-lg-4 col-md-6 col-sm-6 img-height-1" style="">
<div class="img-height-1" style="">
<img src="./assets/images/a.png" width="100%" alt="">
</div>
</div>
<div class="col-lg-4 col-md-6 col-sm-6 img-height-2 mt-sm-0 mt-3" style="">
<div class="img-height-2" style="">
<img src="./assets/images/m.png" width="100%" alt="">
</div>
</div>
<div class="col-lg-4 col-md-6 col-sm-6 img-height-3 mt-lg-0 mt-3" style="">
<div class="img-height-3" style="">
<img src="./assets/images/Rose.png" width="100%" alt="">
</div>
</div>
<div class="col-8 content-1" style="">
<div class="box-3 ">
<h2>Dr.Mahaganapathy Dass</h2>
<h6>Cheif Executive Officer</h6>
<p class="pt-5">
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Iusto, voluptatem! Autem a iste ut id maiores impedit reprehenderit assumenda, quaerat obcaecati perspiciatis blanditiis officia veniam? Corporis a eveniet nulla. Voluptatum fugit recusandae ratione corrupti odio, repudiandae sapiente sed vel inventore earum ad. Totam nihil repellendus, aliquam eum nam distinctio quasi velit quisquam commodi odit culpa voluptate perspiciatis mollitia in porro? Aliquid quas quibusdam laboriosam labore, minima consectetur itaque eveniet amet, nihil at aperiam. Enim magnam eaque rerum soluta repudiandae cupiditate ratione doloribus fugiat, alias pariatur ullam veniam eius autem aspernatur, sed nesciunt voluptatibus quod excepturi sequi perspiciatis deleniti consequuntur! Aliquam!
</p>
<p>
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Mollitia alias veritatis quos maxime sunt soluta accusamus nulla ratione repellat corrupti molestiae, nostrum eligendi, facilis dolorum perferendis ad non unde odio neque. Nihil quia exercitationem animi libero praesentium voluptas placeat suscipit, consequatur molestiae quis minima natus doloribus quidem autem quam veniam?
</p>
<p>
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Esse cupiditate alias cum hic dicta at corrupti? Rerum facilis in aspernatur cupiditate consequatur maiores odit repudiandae, consequuntur sequi eaque minus inventore!
</p>
</div>
</div>
<div class="col-8 content-2" style="">
<div class="box-3 ">
<h2>Dr.Mahaganapathy Dass</h2>
<h6>Cheif Executive Officer</h6>
<p class="pt-5">
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Iusto, voluptatem! Autem a iste ut id maiores impedit reprehenderit assumenda, quaerat obcaecati perspiciatis blanditiis officia veniam? Corporis a eveniet nulla. Voluptatum fugit recusandae ratione corrupti odio, repudiandae sapiente sed vel inventore earum ad. Totam nihil repellendus, aliquam eum nam distinctio quasi velit quisquam commodi odit culpa voluptate perspiciatis mollitia in porro? Aliquid quas quibusdam laboriosam labore, minima consectetur itaque eveniet amet, nihil at aperiam. Enim magnam eaque rerum soluta repudiandae cupiditate ratione doloribus fugiat, alias pariatur ullam veniam eius autem aspernatur, sed nesciunt voluptatibus quod excepturi sequi perspiciatis deleniti consequuntur! Aliquam!
</p>
<p>
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Mollitia alias veritatis quos maxime sunt soluta accusamus nulla ratione repellat corrupti molestiae, nostrum eligendi, facilis dolorum perferendis ad non unde odio neque. Nihil quia exercitationem animi libero praesentium voluptas placeat suscipit, consequatur molestiae quis minima natus doloribus quidem autem quam veniam?
</p>
<p>
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Esse cupiditate alias cum hic dicta at corrupti? Rerum facilis in aspernatur cupiditate consequatur maiores odit repudiandae, consequuntur sequi eaque minus inventore!
</p>
</div>
</div>
<div class="col-8 content-3" style="">
<div class="box-3 ">
<h2>Dr.Mahaganapathy Dass</h2>
<h6>Cheif Executive Officer</h6>
<p class="pt-5">
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Iusto, voluptatem! Autem a iste ut id maiores impedit reprehenderit assumenda, quaerat obcaecati perspiciatis blanditiis officia veniam? Corporis a eveniet nulla. Voluptatum fugit recusandae ratione corrupti odio, repudiandae sapiente sed vel inventore earum ad. Totam nihil repellendus, aliquam eum nam distinctio quasi velit quisquam commodi odit culpa voluptate perspiciatis mollitia in porro? Aliquid quas quibusdam laboriosam labore, minima consectetur itaque eveniet amet, nihil at aperiam. Enim magnam eaque rerum soluta repudiandae cupiditate ratione doloribus fugiat, alias pariatur ullam veniam eius autem aspernatur, sed nesciunt voluptatibus quod excepturi sequi perspiciatis deleniti consequuntur! Aliquam!
</p>
<p>
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Mollitia alias veritatis quos maxime sunt soluta accusamus nulla ratione repellat corrupti molestiae, nostrum eligendi, facilis dolorum perferendis ad non unde odio neque. Nihil quia exercitationem animi libero praesentium voluptas placeat suscipit, consequatur molestiae quis minima natus doloribus quidem autem quam veniam?
</p>
<p>
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Esse cupiditate alias cum hic dicta at corrupti? Rerum facilis in aspernatur cupiditate consequatur maiores odit repudiandae, consequuntur sequi eaque minus inventore!
</p>
</div>
</div>
</div>
</div>
On hover first image other 2 image hide and content slide up, On first hover on image other 2 images hide and content comes up with animation, the process go on for other images also on hover,On hover first image other 2 image hide and content slide up, On first hover on image other 2 images hide and content comes up with animation, the process go on for other images also on hover
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
// Content-1 Img-1
$(document).ready(function(){
// Image show/Hide
$('.img-height-1').hover(function(){
$('.img-height-2, .img-height-3').css('display','none');
// content show
$('.content-1').css('display','block');
},function(){
$('.img-height-2, .img-height-3').css('display', '');
// content show
$('.content-1').css('display', '');
} );
// Image show/Hide
$('.img-height-2').hover(function(){
$('.img-height-1, .img-height-3').css('display','none');
// content show
$('.content-2').css('display','block');
},function(){
$('.img-height-1, .img-height-3').css('display', '');
// content show
$('.content-2').css('display', '');
} );
// Image show/Hide
$('.img-height-3').hover(function(){
$('.img-height-2, .img-height-1').css('display','none');
// content show
$('.content-3').css('display','block');
},function(){
$('.img-height-2, .img-height-1').css('display', '');
// content show
$('.content-3').css('display', '');
} );
})</script>
Please visit this site and make sure that you are looking for same type of css hover effect on image at the middle of the page have.
https://ecommerce-project-eight.vercel.app/
Then I will let you know which code I have used.
I have this page : and the problem there is that there's a vacant space below the white part. what I want is to extend the upper contents the (sidebar-nav and the main- content) to be full page.
<section id="left-sidebar-panel">
<div id="left-panel-content">
<img id="pictureShadow" src="/assets/images/main-photo.jpg">
<nav id="menu-links" >
<ul class="inline-block">
<li class="mb-4 mt-4 text-white">
<a href="/" class="text-3xl font-light flex" id="homePage">
#include("svgs.home")
Home
</a>
</li>
<li class="text-white mb-4">
<a href="/blogs" class="text-3xl hover:text-3xl flex" id="blogsPage">
#include("svgs.post")
Blogs
</a>
</li>
<li class="text-white mb-4">
<a class="text-3xl mt-2 flex" href="/podcasts" id="podcastsPage">
#include("svgs.microphone")
Podcasts
</a>
</li>
<li class="text-white mb-4">
<a class="text-3xl flex" href="/work">
#include("svgs.laptop")
Work
</a>
</li>
<li class="text-white mb-4">
<a class="text-3xl flex" href="/side-projects">
#include("svgs.projects")
Side Projects
</a>
</li>
</ul>
</nav>
</div>
</section>
<p class="text-xl text-normal">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sed consequatur praesentium aliquid unde, debitis sit vel velit distinctio eligendi, nesciunt illum totam ad repudiandae. Pariatur dolor totam omnis eos eius ab debitis reprehenderit dicta, quidem, deleniti? Natus consequatur eum vel voluptatem illum doloremque dolores, id voluptatibus quas nam officia cumque dolor in, nobis maiores alias. Repellendus molestias quia nisi voluptas est voluptate ab quam voluptatum! Atque sequi magnam et iure sunt molestias ipsum odit ad repellendus reprehenderit hic temporibus possimus, totam eligendi quas amet accusantium dolores quibusdam dolorem, corrupti placeat perspiciatis animi velit. Odit quisquam ipsum voluptate quibusdam, et, placeat iure dolorum, expedita quia soluta cupiditate. Dicta cupiditate neque minus excepturi consectetur et, exercitationem fugit at enim ex libero. Debitis, omnis modi harum quisquam. Dicta, est esse fuga dolor doloremque architecto velit magnam eos nesciunt et natus ullam quasi error, eligendi. Autem dolorum debitis reiciendis alias atque fugiat aperiam soluta?</p>
the text inside div is going outside, I don't know how to fix it. I've tried the way of putting columns in the order like shown in my code from here:
How can I get a Bootstrap column to span multiple rows?
An Image used as a template
How the page looks like
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>About us</title>
<!-- versioning can often help (href="css/style.css?ver=2.0") -->
<!-- BOOTSTRAP 4 -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<style>
body {
background-color: #696969;
margin-top: 100px;
}
.well {
background-color: #deedee;
margin: 3px;
}
</style>
</head>
<body>
<div class="container-fluid text-center">
<div class="row">
<div class="col-md-7">
<div class="row">
<div class="col-md-12">
<div class="well">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptate, molestiae saepe! Facilis quidem dolorem temporibus mollitia doloremque, possimus voluptas error aperiam iusto repellendus numquam, laudantium nemo a, debitis nam eveniet repellat rem voluptates culpa iure nisi quae asperiores nulla molestiae consequatur. Facilis quos soluta necessitatibus, excepturi libero. Veritatis impedit expedita architecto assumenda quo cum earum reprehenderit ad reiciendis, explicabo consequatur, iste facilis vel esse nesciunt nihil animi minima eum accusantium eveniet nam. Dolor quas voluptates, officiis numquam corporis quos. Doloribus nisi maiores placeat quas minima, autem numquam natus totam quidem nostrum, quos vel illo magnam blanditiis quam eligendi sed voluptates.</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="well">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptate, molestiae saepe! Facilis quidem dolorem temporibus mollitia doloremque, possimus voluptas error aperiam iusto repellendus numquam, laudantium nemo a, debitis nam eveniet repellat rem voluptates culpa iure nisi quae asperiores nulla molestiae consequatur. Facilis quos soluta necessitatibus, excepturi libero. Veritatis impedit expedita architecto assumenda quo cum earum reprehenderit ad reiciendis, explicabo consequatur, iste facilis vel esse nesciunt nihil animi minima eum accusantium eveniet nam. Dolor quas voluptates, officiis numquam corporis quos. Doloribus nisi maiores placeat quas minima, autem numquam natus totam quidem nostrum, quos vel illo magnam blanditiis quam eligendi sed voluptates.</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="well">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptate, molestiae saepe! Facilis quidem dolorem temporibus mollitia doloremque, possimus voluptas error aperiam iusto repellendus numquam, laudantium nemo a, debitis nam eveniet repellat rem voluptates culpa iure nisi quae asperiores nulla molestiae consequatur. Facilis quos soluta necessitatibus, excepturi libero. Veritatis impedit expedita architecto assumenda quo cum earum reprehenderit ad reiciendis, explicabo consequatur, iste facilis vel esse nesciunt nihil animi minima eum accusantium eveniet nam. Dolor quas voluptates, officiis numquam corporis quos. Doloribus nisi maiores placeat quas minima, autem numquam natus totam quidem nostrum, quos vel illo magnam blanditiis quam eligendi sed voluptates.</div>
</div>
</div>
</div>
<div class="col-md-5">
<div class="well m-0">
<div class="row">
<div class="col-md-7">
Jan Kustra
<br>
<br>
<br>
<br>
<br>
<br>
</div>
<div class="col-md-5">
<img src="img/300.png" alt="my face" width="50%" class="float-right">
</div>
</div>
<div class="row">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Magni similique, suscipit laudantium, error explicabo repellat aperiam, ullam ab non exercitationem vitae, totam quidem eaque labore. Totam neque eaque architecto facilis, unde laudantium quas. Id vel, unde error, fugiat vero ipsa dicta doloribus mollitia ea et eaque incidunt esse. Aliquid ipsa perspiciatis reiciendis, eligendi dolorum architecto, voluptatum, consectetur similique ex quo ad nam, itaque officiis id porro ducimus doloremque reprehenderit. Inventore vel rem voluptatem ullam ab itaque harum rerum, ut hic modi facilis minus quibusdam, veniam quam ipsum. At maiores tenetur, natus illo repudiandae velit, similique harum accusantium voluptatum, quia quas!</p>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
You're missing the column surrounding the text block.
Yours:
<div class="row">
<p>Lorem ipsum...</p>
</div>
Correct:
<div class="row">
<div class="col-md-12">
<p>Lorem ipsum...</p>
</div>
</div>
I am trying to have a bar sit at the bottom of the users screen, but only within a column. I can use position:fixed; bottom:0; if I want the element to stretch across the entire screen, but I can't figure out how to make the bar stay within the column. See picture for example
In the above picture, I want the Like, Comment, Share box to always be at the bottom of the users screen, but stay within the column it's in.
I'm using bootstrap 4, and you can see the website here: https://www.arelplane.com/#arelenglish
EDIT:
HTML of page
<div class='container-fluid user-profile'>
<div class='row'>
<div class='col-md-3 col-12 d-none d-md-block remove-lr-padding' id='sticky-sidebar'>
<div class='row mt-5 mb-5 align-center'>
<div class="col-12">
Some text
</div>
</div>
<div class="row social-module">
<div class="col-4">
Like
</div>
<div class="col-4">
Comment
</div>
<div class="col-4">
Share
</div>
</div>
</div>
<div class='col-md-9 col-12 remove-lr-padding' id='user-map'>
<div class="user-map" id="cesiumContainer"></div>
</div>
</div>
</div>
CSS
.social-module {
background-color: blue;
// position:fixed;
bottom:0;
width: 100%;
margin-left: 0;
margin-right: 0;
}
Edit 2:
Fiddle: https://jsfiddle.net/arel/9t3tnhzt/3/
This is how you make the bar stay at the bottom of the column:
<div class="d-flex align-items-end">...</div>
Alternatively, add the align-items-end class to that column.
No need for custom css in Bootstrap 4.
Here's a working example:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous">
<div class="container-fluid user-profile">
<div class="row">
<div class="col-4 remove-lr-padding" id="sticky-sidebar">
<div class="row text-center">
<div class="col-12 bg-warning" style="min-height: 100vh;">
<p>Feature requests? Questions?</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate temporibus assumenda molestias laborum ipsam quisquam, nisi, aspernatur quia, ratione ipsum illo cum exercitationem nostrum dolor corrupti ducimus sunt provident harum. Eum, ullam id! Adipisci perspiciatis reiciendis minus quisquam culpa nobis voluptatem suscipit iusto dolores hic ab impedit incidunt rem labore praesentium, sed itaque voluptates distinctio vero temporibus quia atque magni ratione. Ratione, sit maiores asperiores architecto deserunt ducimus dignissimos? Error doloremque reiciendis repellendus esse dolor at expedita non. Ipsum maxime optio quasi, ratione pariatur excepturi aperiam. Dolores nisi magni est suscipit placeat nobis quaerat fugit culpa laboriosam, quam autem aut nesciunt fuga reiciendis dolor omnis doloremque ab corporis dicta adipisci eos amet ipsa. Qui beatae possimus pariatur nemo ducimus autem, architecto officia libero nisi quo, a earum repellendus explicabo cumque quidem consequatur sapiente ipsam molestias molestiae, nostrum sed nesciunt neque. Ex accusantium inventore quam! Commodi tempora eligendi possimus nam ut similique quidem, rem enim, quo quisquam autem accusantium! Suscipit error a quidem adipisci. Repellat maxime nesciunt id quasi deleniti, consectetur, est eius commodi doloremque odit, fugiat! Consequatur modi distinctio reiciendis natus et quibusdam eum doloribus temporibus delectus obcaecati laboriosam earum, ad eveniet! Ea, necessitatibus perferendis, nostrum aperiam saepe voluptates reiciendis odit, quis porro ipsa omnis ab iste doloribus, cupiditate nobis eos enim cum molestias facilis laudantium ex. Hic at impedit in alias.</p>
</div>
<div class="row social-module position-sticky fixed-bottom m-0 w-100 py-2 bg-primary">
<div class="col-12 col-md-4">
Like
</div>
<div class="col-12 col-md-4">
Cmnt
</div>
<div class="col-12 col-md-4">
Share
</div>
</div>
</div>
</div>
<div class="col-8 remove-lr-padding" id="user-map">
hello
</div>
</div>
</div>
I just added the h-100 class to the row and then added the position-sticky class to the other row.
Oh, and I ripped out your margins. :-)
I would like to know how I can avoid the big whitespace using float: left, all the block does not have the same height
here's a demo
<div class="container">
<div class="block">
<div class="content">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laudantium, molestias vel quia ratione a nostrum quae provident facere perspiciatis commodi!</div>
</div>
<div class="block">
<div class="content">Est, eaque, enim? Illo, incidunt, molestias aut expedita aspernatur consectetur quos sit accusantium hic mollitia beatae numquam itaque excepturi eaque.</div>
</div>
<div class="block">
<div class="content">Nihil, quibusdam animi voluptatum modi pariatur aliquam adipisci nostrum placeat eos atque maxime odit optio molestias nisi dignissimos. Cum, vel?</div>
</div>
<div class="block">
<div class="content">Tempore, adipisci voluptatibus iure temporibus aut hic deleniti inventore accusantium excepturi vel et omnis veritatis itaque nesciunt odit ut nemo?</div>
</div>
<div class="block">
<div class="content">Voluptas, dignissimos, reiciendis, rem quasi neque quia molestiae in consequatur animi at et qui sint nihil ipsum corrupti totam repudiandae?</div>
</div>
<div class="block">
<div class="content">Tempora, velit, incidunt a est sed nostrum optio suscipit in sint eveniet architecto pariatur culpa asperiores minus praesentium perspiciatis dignissimos.</div>
</div>
<div class="block" style="height:200px"><!-- this height is for example, the height can be higher or lower -->
<div class="content">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aperiam, enim, quidem laudantium quo iusto deleniti sed assumenda placeat dolorem est?</div>
</div>
<div class="block">
<div class="content">Earum, ut, laudantium, eaque, quaerat architecto officiis magni iusto eum nesciunt asperiores illum sit. Et officiis modi tempore mollitia sunt.</div>
</div>
<div class="block">
<div class="content">Nobis, placeat, tenetur tempore facere reiciendis illo reprehenderit sunt a ratione hic deleniti quaerat fuga ex minus eum culpa laborum.</div>
</div>
<div class="block">
<div class="content">Qui, nostrum, ab, totam, molestias quaerat expedita saepe odit accusamus reiciendis rerum officia provident iusto voluptate quis quos sit nisi.</div>
</div>
<div class="block">
<div class="content">Eum, dolorem, qui, autem dolorum et molestiae asperiores rerum eius minus iste quaerat labore distinctio vel cum quis atque consequatur.</div>
</div>
<div class="block">
<div class="content">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iure est magni necessitatibus consequatur deleniti aut veniam repellat quis similique ab.</div>
</div>
<div class="clear"></div>
</div>
Style.css
body {color:white;}
.clear{clear: both;}
.block {float:left;width: 50%;height:100px;}
.content {margin: 10px; padding: 10px; background-color: #000;}
Using regular css you can't really avoid the whitespace underneath each of your elements.
The only way to do it with css would be to have all of your content arranged in columns, not all actually floated left.
Most people get around this problem by using a plugin such as http://masonry.desandro.com/ which uses jQuery/JavaScript to make it work.
Hope that helps.