How do I write inside my footer and keep it at the bottom of the page?
.underbar {
bottom:0;
width:100%;
height:60px;
background:#000000;
}
<footer class="underbar">
</footer>
How do I write inside my footer and keep it at the bottom of the page?
.underbar {
bottom:0;
width:100%;
height:60px;
background:#000000;
}
<footer class="underbar">
</footer>
.underbar {
bottom:0;
width:100%;
height:60px;
background:#000000;
position: fixed;
}
Add Property position:fixed;
Use position:fixed property
.underbar {
bottom:0;
width:100%;
height:60px;
background:#000000;
position:fixed;
}
<footer class="underbar">
</footer>
i have tried, check may be this will help u
.underbar {
bottom:0;
width:100%;
height:60px;
padding:0px;
margin:0px;
background:#000000;
position:fixed;
}
<footer class="underbar">
</footer>
You can add the position property in the css.
.underbar {
position:fixed;
bottom:0;
width:100%;
height:60px;
background:#000000;
}
And you can put your text inside the footer tag.
<footer class="underbar">
Your text here
</footer>
You can use the following:
position: fixed;
right: 0;
bottom: 0;
left: 0;
and it will work!
Below you may find a jfiddle example for your code:
<style>
.underbar {
bottom:0;
width:100%;
height:60px;
background:#000000;
position: fixed;
}
</style>
<HTML>
<HEAD>
</HEAD>
<BODY>
<footer class="underbar">
footer
</footer>
</BODY>
</HTML>
check it
html,
body {
height: 100%;
margin: 0;
padding: 0;
}
#container {
min-height: 100%;
position: relative;
}
#header {
background: #ff0 none repeat scroll 0 0;
padding: 10px;
}
#body {
padding: 10px 10px 60px;
}
#footer {
background: #6cf none repeat scroll 0 0;
bottom: 0;
height: 60px;
position: absolute;
width: 100%;
}
#header p,
#header h1 {
margin: 0;
padding: 10px 0 0 10px;
}
#footer p {
margin: 0;
padding: 10px;
}
<div id="container">
<div id="header">
<!-- Header start -->
<p><a href="http://matthewjamestaylor.com/blog/keeping-footers-at-the-bottom-of-the-page" title="How to keep footers at the page bottom with valid CSS">« Back to the CSS article</a> by <a href="http://matthewjamestaylor.com">Matthew James Taylor</a>
</p>
<h1>How to keep footers at the bottom of the page (CSS demo)</h1>
<!-- Header end -->
</div>
<div id="body">
<!-- Body start -->
<p>In this demo the footer is pushed to the bottom of the screen in all standards compliant web browsers even when there is only a small amount of content on the page. This with work with IE 6 and IE 5.5 too. Non-standards compliant browsers degrade
gracefully by positioning the footer under the content as per normal. Read the <a href="http://matthewjamestaylor.com/blog/keeping-footers-at-the-bottom-of-the-page">full article</a> for all the details.</p>
<!-- Body end -->
</div>
<div id="footer">
<!-- Footer start -->
<p><strong>Footer</strong> (always at the bottom). View more <a href="http://matthewjamestaylor.com/blog/-website-layouts">website layouts</a> and <a href="http://matthewjamestaylor.com/blog/-web-design">web design articles</a>.</p>
<!-- Footer end -->
</div>
</div>
* {
margin: 0;
}
html, body {
height: 100%;
}
.wrapper {
min-height: 100%;
margin: 0 auto -60px;
background:green;
}
footer{
height: 60px;
background:#000000;
color:#ffffff;
text-align:center;
}
.push {
height: 60px;
}
header{
background:gold;
}
<!DOCTYPE html>
<div class="wrapper">
<header>
<h1>Fixed Footer</h1>
</header>
<div class="push"></div>
</div>
<footer>
<h5>
Fixed Footer
</h5>
</footer>
First add these scripts to your document.
<head>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
And then add the class "footer navbar-fixed-bottom" to the footer. Thats should work.
<footer class="footer navbar-fixed-bottom"> </footer>