Full screen a part of page - html

I have a html code like this:
<header>title</header>
<content class="container-fluid">
<div class="row">
<div class="col-sm-3 leftside">
<ul>
<li>test</li>
<li>test</li>
<li>test</li>
<li>test</li>
<li>test</li>
</ul>
</div>
<div class="col-sm-9">
<div id="map"></div>
</div>
</div>
</content>
<footer>footer</footer>
I want show the content section of code in one monitor screen.
google map must be full screen (and responsive).
and also side menu must be full screen (for more rows, It must use scroll in it's columns)
how can I do it?
demo code sample
EDIT:
when I open the page by brower, I could see the header and the content (in full screen) and with scroll I can see the footer section.

Here you go... see snippet below. Also here https://jsfiddle.net/darrendiscovr/s1vp1348/ and without Google maps API error.
5 minutes reading the bootstrap docs https://getbootstrap.com/ will get you on the right track and makes learning their components a breeze.
var settingsItemsMap = {
zoom: 12,
center: new google.maps.LatLng(40.768516981, -73.96927308),
zoomControlOptions: {
style: google.maps.ZoomControlStyle.LARGE
},
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById('map'), settingsItemsMap);
var myMarker = new google.maps.Marker({
position: new google.maps.LatLng(40.768516981, -73.96927308),
draggable: true
});
map.setCenter(myMarker.position);
myMarker.setMap(map);
nav {
background: red;
color: #fff;
}
.sidebar {
position: fixed;
top: 51px;
bottom: 0;
left: 0;
z-index: 1000;
padding: 20px 0;
overflow-x: hidden;
overflow-y: auto;
border-right: 1px solid #eee;
background: lightblue;
}
main.col-sm-9.ml-sm-auto.col-md-10 {
padding: 0;
}
section.content {
padding: 2em;
height: 100vh;
}
#map {
height: 100vh;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&callback=initialize"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js"></script>
<header>
<nav class="navbar fixed-top">
<a class="navbar-brand">
Title
</a>
</nav>
</header>
<div class="container-fluid">
<div class="row">
<nav class="col-sm-3 col-md-2 sidebar">
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link active" href="#">Menu 1</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Menu 2</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Menu 3</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">...</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">...</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">...</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">...</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">...</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">...</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">...</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">...</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Menu Last</a>
</li>
</ul>
</nav>
<main role="main" class="col-sm-9 ml-sm-auto col-md-10">
<section class="content">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent ante quam, accumsan vitae augue ut, pharetra placerat ligula. Nam sed lorem augue. Donec ipsum velit, mattis sit amet nibh eu, ultrices porta nulla. In dictum ex ligula, eu efficitur metus
pretium et. Aliquam convallis dictum justo in imperdiet. Praesent tincidunt orci et fringilla consequat. Fusce convallis, dolor in mollis gravida, leo risus hendrerit magna, id sagittis nisl tellus quis ex. Mauris rutrum aliquam eleifend. Nullam
dignissim dictum rutrum. Nam tristique mattis nunc nec pretium. Ut at maximus nibh. Donec vel semper sapien, eget semper neque. Maecenas felis magna, condimentum ac ipsum vitae, auctor egestas massa. Nunc vulputate accumsan sem et vehicula.
Nulla ac lorem congue tortor pharetra feugiat. Curabitur lacinia, nisl quis vestibulum convallis, lorem lectus bibendum elit, sed finibus sapien tortor a orci.
</p>
</section>
<section>
<div id="map"></div>
</section>
</main>
</div>
</div>

Related

How to get div height of his parent while using d-flex in Bootstrap

The problem is that I want the navigation menu to be 100% height of bordered div and I don't really know where is the issue.
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
<div class=" mt-5 border rounded h-100">
<div class="d-flex flex-column navbar-dark bg-dark rounded-start float-start h-100">
<div class=" flex-column px-2" style="">
<ul class="navbar-nav justify-content-center me-auto mb-2 mb-lg-0 flex-column">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="logout.php">Logout</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>
</ul>
</div>
</div>
<div class=" d-flex flex-column content p-3">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vel lacus a sem hendrerit lobortis. Vestibulum vel nulla non velit rhoncus eleifend. Suspendisse molestie nec nisl cursus fringilla. Morbi aliquet turpis sit amet pulvinar bibendum. Curabitur
non nunc in tellus vehicula volutpat molestie malesuada ante. In lobortis quam sed maximus scelerisque. Duis imperdiet mollis ornare. Morbi aliquet turpis sit amet pulvinar bibendum. Curabitur
non nunc in tellus vehicula volutpat molestie malesuada ante. In lobortis quam sed maximus scelerisque. Duis imperdiet mollis ornare.
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.0-beta2/dist/js/bootstrap.bundle.min.js" integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0" crossorigin="anonymous"></script>
Can you please check the below code? Hope it will work for you. You have to remove height(h-100) from navbar-dark and please give d-flex to the parent element.
Please refer to this link: https://jsfiddle.net/yudizsolutions/1j87zkqb/
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
<div class="d-flex mt-5 border rounded h-100">
<div class="d-flex flex-column navbar-dark bg-dark rounded-start float-start">
<div class=" flex-column px-2" style="">
<ul class="navbar-nav justify-content-center me-auto mb-2 mb-lg-0 flex-column">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="logout.php">Logout</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>
</ul>
</div>
</div>
<div class=" d-flex flex-column content p-3">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vel lacus a sem hendrerit lobortis. Vestibulum vel nulla non velit rhoncus eleifend. Suspendisse molestie nec nisl cursus fringilla. Morbi aliquet turpis sit amet pulvinar bibendum. Curabitur
non nunc in tellus vehicula volutpat molestie malesuada ante. In lobortis quam sed maximus scelerisque. Duis imperdiet mollis ornare. Morbi aliquet turpis sit amet pulvinar bibendum. Curabitur non nunc in tellus vehicula volutpat molestie malesuada
ante. In lobortis quam sed maximus scelerisque. Duis imperdiet mollis ornare.
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.0-beta2/dist/js/bootstrap.bundle.min.js" integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0" crossorigin="anonymous"></script>

Why is my button not jumping to its intended section in Bootstrap 4?

I have a question regarding using scrollspy, adding a button inside the navbar, and having that button jump to its intended target section. I added a tag to be more semantic, and used a with the class of form-inline to put it next to the navbar links. The nav links work fine, but the button doesn't.
I was trying different ways to add the href to the button tag, or to substitute the tag with an tag and removing the tag, but nothing works. I was trying to find a scrollspy that used the tag, but no luck. Here's my code:
<body data-spy="scroll" data-target="#navbar">
<nav class="navbar fixed-top navbar-expand-md navbar-dark" id="navbar">
<a class="navbar-brand" href="index.html" id="navbarBrand">Unexpected Friends</a>
<!--navbar toggler is the hamburger icon that appears when in smaller screens-->
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div id="navbarNav" class="collapse navbar-collapse">
<!--ml-auto moves the links to the right-->
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="#ourStory">Our Story<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#gallery">Gallery</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#blog">Blog</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#contact">Contact</a>
</li>
<form class="form-inline" id="button">
<button type="button" class="btn btn-outline-light" role="button" id="waysToHelp" href="#waysToHelp">Ways to Help</button>
</form>
</ul>
</div><!--navbarNav-->
</nav>
<section id="waysToHelp">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<img src="img/uf_10.jpg" class="img-fluid float-right ml-4">
<h1 class="text-center">Ways To Help</h1>
<p>Pretium vulputate sapien nec sagittis aliquam malesuada bibendum arcu. Lacinia quis vel eros donec ac. Arcu cursus vitae congue mauris rhoncus aenean vel elit scelerisque. Faucibus turpis in eu mi bibendum. Massa ultricies mi quis hendrerit. Bibendum ut tristique et egestas quis. Nisi vitae suscipit tellus mauris a. Lobortis feugiat vivamus at augue eget. Placerat vestibulum lectus mauris ultrices eros in cursus turpis massa. Pellentesque elit ullamcorper dignissim cras. Pellentesque sit amet porttitor eget dolor morbi non arcu risus. Tellus id interdum velit laoreet id donec ultrices tincidunt. Et egestas quis ipsum suspendisse ultrices gravida dictum fusce. Adipiscing diam donec adipiscing tristique risus. Mattis vulputate enim nulla aliquet porttitor lacus luctus accumsan tortor. Dictum sit amet justo donec enim diam. Porttitor lacus luctus accumsan tortor posuere ac ut consequat. Ultricies tristique nulla aliquet enim.<br><br>
Congue nisi vitae suscipit tellus mauris a diam maecenas sed. Risus in hendrerit gravida rutrum quisque. Tristique et egestas quis ipsum suspendisse ultrices gravida dictum. Ipsum consequat nisl vel pretium lectus quam id. Ut sem viverra aliquet eget sit amet. Sed euismod nisi porta lorem mollis aliquam ut porttitor leo. Semper quis lectus nulla at volutpat diam ut. Risus at ultrices mi tempus. Eu feugiat pretium nibh ipsum consequat nisl. Eu scelerisque felis imperdiet proin fermentum. Lorem sed risus ultricies tristique nulla aliquet enim tortor at. Sit amet mauris commodo quis imperdiet massa. Urna porttitor rhoncus dolor purus. Molestie ac feugiat sed lectus vestibulum mattis ullamcorper velit.</p>
</div><!--column-->
</div><!--row-->
</div><!--container-->
</section>
</body>
Kindly read the documentation properly :
The data-spy attribute will be on the div outside the the nav with a data-target to indicate the selected nav
It has to be a tag because of href. It converts hash url,which is also accessible when entered in the url directly. That is the fundamentals of how it works.
You can do it like -
<button type="button" class="btn btn-outline-light" role="button"
id="waysToHelp">ways to help</button>
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="#ourStory">Our Story<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#gallery">Gallery</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#blog">Blog</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#contact">Contact</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#waysToHelp">ways to help</a>
</li>
<form class="form-inline" id="button">
<button type="button" class="btn btn-outline-light" role="button" id="waysToHelp">ways to help</button>
</form>
</ul>
Example - https://jsfiddle.net/cvwrfau0/

Horizontal tabs dont show content

Horizontal tabs html placed in a Moodle book, when you view this it doesnt show you the content i have placed in it, its just blank, when you click on the tab then you can see the content, but its like the initial view as the page is opened shows nothing, and once the tab is clicked on its viewable, but that is very annoying. Any help?
<!-- Start of horizontal tabs -->
<ul class="nav nav-pills mb-0" id="pills-tab" role="tablist">
<li class="nav-item">
<a class="nav-link active show" id="h-tabs-t1-tab" data-toggle="pill" href="#h-tabs-t1" role="tab" aria-controls="h-tabs-t1" aria-selected="true">ONE</a>
</li>
<li class="nav-item">
<a class="nav-link" id="h-tabs-t2-tab" data-toggle="pill" href="#h-tabs-t2" role="tab" aria-controls="h-tabs-t2" aria-selected="false">TWO</a>
</li>
<li class="nav-item">
<a class="nav-link" id="h-tabs-t3-tab" data-toggle="pill" href="#h-tabs-t3" role="tab" aria-controls="h-tabs-t3" aria-selected="false">THREE</a>
</li>
</ul>
<div class="tab-content card" id="pills-tabContent">
<div class="tab-pane p-3 fade active show" id="h-tabs-t1" role="tabpanel" aria-labelledby="h-tabs-t1-tab">
<h4>ONE</h4>
<p>Nisl vel pretium lectus quam id leo. Dolor purus non enim praesent elementum facilisis leo vel. Sit amet nulla facilisi morbi tempus. Facilisis volutpat est velit egestas dui id ornare. Est lorem ipsum dolor sit amet.</p>
</div>
<div class="tab-pane p-3 fade" id="h-tabs-t2" role="tabpanel" aria-labelledby="h-tabs-t2-tab">
<h4>TWO</h4>
<p>Sollicitudin ac orci phasellus egestas tellus rutrum. Commodo odio aenean sed adipiscing diam donec adipiscing tristique risus. </p>
</div>
<div class="tab-pane p-3 fade" id="h-tabs-t3" role="tabpanel" aria-labelledby="h-tabs-t3-tab">
<h4>THREE</h4>
<p>Aliquet enim tortor at auctor urna nunc id. Sem integer vitae justo eget magna fermentum.</p>
</div>
</div>
<!-- End of horizontal tabs -->
Did you include the jquery library script in the html?
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
Also adding 'show' class in the divs wrapping the content of each tab too
<div class="tab-pane p-3 fade show"
id="h-tabs-t2"
role="tabpanel"
aria-labelledby="h-tabs-t2-tab">
<h4>TWO</h4>
<p>
Sollicitudin ac orci phasellus egestas tellus rutrum. Commodo odio
aenean sed adipiscing diam donec adipiscing tristique risus.
</p>
</div>

Implement Navigation from Cody House-Way to add background blur?

I'm basically implementing this navigation from Cody House. For smaller screens <1000px, is there a way to have the nav .cd-morph-dropdown .morph-dropdown-wrapper have a width of 90% (instead of 100%) and have the background behind the nav blur? Basically have the area around the nav overlay to be blurred and have nav be clear.
Would the way around it be to apply the filter: blur(10px) to every div following the navigation via jquery? There has got to be a better approach.
NAV HTML
<nav class="main-nav">
<ul>
<li class="has-dropdown gallery" data-content="about">
About
</li>
<li class="has-dropdown links" data-content="pricing">
Pricing
</li>
<li class="has-dropdown button" data-content="contact">
Contact
</li>
</ul>
</nav>
<div class="morph-dropdown-wrapper">
<div class="dropdown-list">
<ul>
<li id="about" class="dropdown gallery">
About
<div class="content">
<ul>
<li>
<a href="#0">
<em>Title here</em>
<span>A brief description here</span>
</a>
</li>
<li>
<a href="#0">
<em>Title here</em>
<span>A brief description here</span>
</a>
</li>
<li>
<a href="#0">
<em>Title here</em>
<span>A brief description here</span>
</a>
</li>
<li>
<a href="#0">
<em>Title here</em>
<span>A brief description here</span>
</a>
</li>
</ul>
</div>
</li>
<li id="pricing" class="dropdown links">
Pricing
<div class="content">
<ul>
<li>
<h2>Services</h2>
<ul class="links-list">
<li>Logo Design</li>
<li>Branding</li>
<li>Web Design</li>
<li>iOS</li>
<li>Android</li>
<li>HTML/CSS/JS</li>
<li>Packaging</li>
<li>Mobile</li>
<li>UI/UX</li>
<li>Prototyping</li>
</ul>
</li>
<li>
<h2>Projects</h2>
<ul class="links-list">
<li>Logo Design</li>
<li>Branding</li>
<li>Web Design</li>
<li>iOS</li>
<li>Android</li>
<li>HTML/CSS/JS</li>
</ul>
</li>
</ul>
</div>
</li>
<li id="contact" class="dropdown button">
Contact
<div class="content">
<ul class="links-list">
<li>Link #1</li>
<li>Link #2</li>
<li>Link #3</li>
<li>Link #4</li>
<li>Link #5</li>
<li>Link #6</li>
</ul>
Get in Touch
</div>
</li>
</ul>
<div class="bg-layer" aria-hidden="true"></div>
</div> <!-- dropdown-list -->
</div> <!-- morph-dropdown-wrapper -->
</header>
<main class="cd-main-content">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent ultrices malesuada scelerisque. Vivamus placerat dignissim eros ut sollicitudin. Suspendisse potenti. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse ut tellus euismod, sagittis enim eu, luctus tortor. Cras eros urna, maximus et arcu et, vehicula auctor erat. Aliquam laoreet dui eu magna mollis ornare ut in lectus. Proin nec sapien leo. Phasellus rhoncus risus sit amet mi tempus dignissim. Ut dictum faucibus ipsum, congue aliquet mauris laoreet vel. Suspendisse ultricies, libero a ullamcorper volutpat, erat nunc sagittis tellus, sit amet bibendum diam mi sed justo. Integer ac ex a felis pretium malesuada et condimentum nunc. Proin vitae mauris ex. Quisque consectetur metus et sagittis fringilla. Morbi pretium libero sed enim scelerisque, accumsan venenatis ex consectetur.</p>
</main>
Edit: added a codepen here.

Design bootstrap 3 page layout dynamically maintaining height, scroll, width

I am trying to design page layout by using bootstrap css. I have lost already four days but I cannot do perfectly. I am falling two problems like below:
How can I make Bootstrap columns all the same height?
Scroll bar is underneath because of top nav bar not fixed.
The image of my problem below:
I have used following code .........
HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
<script data-require="jquery#*" data-semver="2.1.1" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link data-require="bootstrap#*" data-semver="3.2.0" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.css" />
<script data-require="bootstrap#*" data-semver="3.2.0" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
<body>
<header>
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Brand</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active">Link
</li>
<li>Link
</li>
<li class="dropdown">
Dropdown <span class="caret"></span>
<ul class="dropdown-menu" role="menu">
<li>Action
</li>
<li>Another action
</li>
<li>Something else here
</li>
<li class="divider"></li>
<li>Separated link
</li>
<li class="divider"></li>
<li>One more separated link
</li>
</ul>
</li>
</ul>
<form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search" />
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
<ul class="nav navbar-nav navbar-right">
<li>Link
</li>
<li class="dropdown">
Dropdown <span class="caret"></span>
<ul class="dropdown-menu" role="menu">
<li>Action
</li>
<li>Another action
</li>
<li>Something else here
</li>
<li class="divider"></li>
<li>Separated link
</li>
</ul>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>
</header>
<section class="main">
<div class="container-fluid">
<div class="row row-one">
<div class="col-xs-12">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur molestie pharetra lacus, a tincidunt elit fermentum ac. Praesent ac mauris nisl. Cras aliquet imperdiet nunc, vestibulum faucibus urna laoreet eu. Aliquam pharetra leo ut mauris
tempus dignissim. Aenean mollis dui sed orci hendrerit vitae hendrerit nisi convallis. Ut id libero a metus ullamcorper consectetur. Suspendisse sed risus erat. In pharetra velit condimentum nisl interdum sed iaculis mi consectetur. Pellentesque
habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Maecenas vulputate consectetur urna, a dignissim odio vestibulum a.</p>
</div>
</div>
<div class="row row-two">
<div class="col-xs-12">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur molestie pharetra lacus, a tincidunt elit fermentum ac. Praesent ac mauris nisl. Cras aliquet imperdiet nunc, vestibulum faucibus urna laoreet eu. Aliquam pharetra leo ut mauris
tempus dignissim. Aenean mollis dui sed orci hendrerit vitae hendrerit nisi convallis. Ut id libero a metus ullamcorper consectetur. Suspendisse sed risus erat. In pharetra velit condimentum nisl interdum sed iaculis mi consectetur. Pellentesque
habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Maecenas vulputate consectetur urna, a dignissim odio vestibulum a.</p>
</div>
</div>
</div>
</section>
<footer class="navbar navbar-inverse navbar-fixed-bottom">
<ul class="nav navbar-nav">
<li class="active"><span class="glyphicon glyphicon-home"></span>
</li>
<li><span class="glyphicon glyphicon-user"></span>
</li>
<li><span class="glyphicon glyphicon-calendar"></span>
</li>
<li><span class="glyphicon glyphicon-comment"></span>
</li>
<li><span class="glyphicon glyphicon-star"></span>
</li>
</ul>
</footer>
</body>
</html>
CSS:
html, body {
height: 100%;
overflow: hidden;
}
body {
padding: 0px 0;
}
.navbar {
margin-bottom: 0px;
}
.main {
height: 100%;
overflow-y: scroll;
padding: 0px 0;
}
footer .navbar-inverse {
background: #5f5f5f;
}
/*Prevent the Footer from Collapsing*/
footer .navbar-nav {
float: left;
margin: 0;
}
footer .navbar-nav > li {
float: left;
}
footer .navbar-nav > li > a {
padding-top: 15px;
padding-bottom: 15px;
}
/*END: Prevent the Navbar from Collapsing*/
.row-one {
/*do not use display: table-row;*/
}
.row-two {
/*do not use display: table-row;*/
}
.row-one > .col-xs-12 {
background-color: gray;
}
.row-two > .col-xs-12 {
background-color: bisque;
}
.row {
overflow: hidden;
}
[class*="col-"] {
margin-bottom: -99999px;
padding-bottom: 99999px;
}
Precaution:
Avoid display: table, table-row, and table-cell.
Avoid JavaScript code.
Plunker
css should be for example
.row-one{
height:500px;}
.row-two{
height:500px;}
as that is the container of the text it would make them alot taller, obviously customise to your own needs