How to Make Footer in Html and CSS (Best Footer Design )

 In this Article, You will be learning about How to Make Footer in HTML and CSS. Footer is the bottom most important part of the website. This happens in all websites. A good footer design enhances the beauty of the website. Apart from this, it is one of the easiest things done by Front End Developer. So here we learn about How to Make Footer in HTML and CSS or Create a Footer in HTML and CSS. After that we will learn how to design a very beautiful Footer.



How to Make Footer in Html and CSS

first of all, You need to know this. Here we are running the series of Top 100 Web Development Projects. Whose this is the fourth project. So let's learn now. How Create Footer

How to Create Sticky Footer 

We will Create a Responsive Multi- level Sticky Footer With Flexbox. 


Also You Can check Demo Here 

<div class="footer">
  <div class="container">
  	<div class="row">
  		<h1 class="title"> About Us</h1> 
         <p>  Thedigitalslife is 
a Blog which proide content about web 
development, Blogging, SEO, Digital marketing
 and Earn Money. Anyone can learn
 about Web deelopment. We try to share great content which really helpful for you. 
Out all Content is absolutely free of cost. </p>

  	</div>
  	<div class="row">
  		<h1 class="title"> Tech Learn</h1> 
         <ul>
         	<li> <a href=""> Wordpress</a></li>
         	<li> <a href=""> Blogger</a></li>
         	<li> <a href=""> Google Adsense</a></li>
         	<li> <a href=""> SEO</a></li>
         </ul>

  	</div>
  	<div class="row">
  		<h1 class="title"> Web Development</h1> 
         <ul>
         	<li> <a href=""> HTML</a></li>
         	<li> <a href=""> CSS</a></li>
         	<li> <a href=""> Javascript</a></li>
         	<li> <a href=""> Jquery</a></li>
         </ul>

  	</div>
  	<div class="row">
  		<h1 class="title"> Blogging</h1> 
        <ul>
         	<li> <a href=""> Blog Design</a></li>
         	<li> <a href=""> Monitization</a></li>
         	<li> <a href=""> Customization</a></li>
         	<li> <a href=""> SEO</a></li>
         </ul>

  	</div>
  	<div class="row">
  		<h1 class="title"> Earn Money</h1> 
        <ul>
         	<li> <a href=""> Google Adsese</a></li>
         	<li> <a href=""> Freelancing</a></li>
         	<li> <a href=""> Web Development</a></li>
         	<li> <a href=""> SEO</a></li>
         </ul>

  	</div>

  </div>

</div>

Output 



Now we have created the HTML code for the footer. Now we need to understand it. After that we can write CSS Code easily. That is, you can design it easily.

1. <div class="footer"> This is the main div, whose class is footer. By this we will set the color and position of the footer.


.footer {
   left: 0;
   bottom: 0;
   width: 100%;
   background-color: #111;
   color: white;
   
}

left:0 remove margin of left and bottom:0  Takes to the bottom. Width:100% Sets width 100% and background-color: #111; sets Background Black Color, color:white sets text Color. 

2. <div class="container"This sets the display of the content inside the footer. 


.container {
	display: flex;
}

CSS Code

<style>
	body {
		margin:0;
		padding: 0;
	}
.footer {
   left: 0;
   bottom: 0;
   width: 100%;
   background-color: #111;
   color: white;
   
}
.container {
	display: flex;
}
.row {
	padding: 1.25rem;
    min-width: 12.5rem;
}
.row ul {
	padding: 0;
}
.row li {
	list-style:none;
}
.row ul li a{
	  color: #a9a39f;
    position: relative;
    display: inline-block;
    overflow: hidden;
    margin-right: .2rem;
}
.row p {
	 color: #a9a39f;
}
.title {
	color:#ff7a18;
	    font-size: 15px;
	    font-family: Gotham Narrow SSm A,Gotham Narrow SSm B,Rubik,Lato,Lucida 
Grande,Lucida Sans Unicode,Tahoma,Sans-Serif;
    font-style: normal;
    font-weight: 800;   
    text-transform: uppercase;
    margin: 2rem 0 .25rem;
} 
.text p {
	padding-bottom: 200px;
}
@media screen and (max-width: 800px) {
  .container {
   display: initial; 
  }
}
</style>

How to Make Header in Html and CSS (Best Header Design)

In This, Article You will Learn How to Make Header in HTML and CSS or Create Header in  HTML CSS .  Whenever you start designing a website. So first we have to do Header Design. Designing the header is a bit hard. Because it has to design logo and many links. Then it has to be made responsive. But in this article, complete information about How to Make Header in Html and CSS or How Design Responsive Header is given. Here, not only the code but how it is designed. It is also explained.



How to Make Header in HTML CSS 

First We will Share The Code of Header Design and then we explained you. This is a Simple Header Only you can see and learn how make header in HTML CSS

Simple Header Design 


This is Very Simple Header Design Which has logo image in Left Side and Navigation Links in Right Side. It is Responsive and  Its code is very simple and clean, which can be easily understood. 


You can check Responsive design by reducing the width of the Browser.

HTML Code 


<!DOCTYPE html>
<html>
<head>
	<title>Header Design</title>
	<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>

<div class="Header">
<div class="logo">
<img src="https://1.bp.blogspot.com/-4m_nJYxnWWQ/X8ndVPH8l8I/
AAAAAAAABO8/fQj64VedI6Qkh2l5D-sQ2VLeXyShwCKsgCLcBGAsYHQ/w400-h88/
cooltext370479803482355.png">	
</div>	
<div class="menu">
<ul class="menu-link">
	<li> <a href=""> Home</a> </li>
	<li> <a href=""> About Us</a> </li>
	<li> <a href=""> Contact Us</a> </li>
	<li> <a href=""> Privacy Policy</a> </li>
</ul>	
</div>
</div>

</body>
</html>

Now can see its HTML code. Let's try to understand it.

1. First Need a div for start making header. <div class="Header" Its class header is taken.

2. Now a second div has been created which will determine the left side <div class="logo"which has been added logo with img tag. 

3. Now the source of logo img has to be given in it. 

4. Similarly, now we have to create a Div for a Right Side. In which we will add a link to the navigation menu. <div class="menu">

5. Now the link has been added. This has been added through the ul li tag.

Similarly, HTML Coding of Our Header Design is Completed. Now we start moving towards CSS. 

CSS Code 


body {
	margin: 0;
	padding: 0;
}

.Header {
overflow: hidden;
	width: 100%;
    background-color: #a94e52;
    box-shadow: 0 0 25px 0 rgba(0,0,0,.12);
}

.logo {
	float: left;
}
.logo img{
	line-height: 1px;
}
.menu {

	
	padding-right: 25px;
}
ul {
	list-style-type: none;
	float: right;
}
li {
	padding: 10px;
	float: left;
}
li a {

	font-size: 25px;
	text-decoration: none;
	color: #ffed13;
    font-weight: bold;
}
@media screen and (max-width: 900px) {
   .logo {
      width: 20%
   }
   li a {

	font-size: 15px;
    line-height: 2;
}
}

Now the design of this Header is complete.

Full Code of Header Design 


<!DOCTYPE html>
<html>
<head>
	<title>Header Design</title>
	
<style>
body {
	margin: 0;
	padding: 0;
}

.Header {
overflow: hidden;
	width: 100%;
    background-color: #a94e52;
    box-shadow: 0 0 25px 0 rgba(0,0,0,.12);
}

.logo {
	float: left;
}
.logo img{
	line-height: 1px;
}
.menu {

	
	padding-right: 25px;
}
ul {
	list-style-type: none;
	float: right;
}
li {
	padding: 10px;
	float: left;
}
li a {

	font-size: 25px;
	text-decoration: none;
	color: #ffed13;
    font-weight: bold;
}
@media screen and (max-width: 900px) {
   .logo {
      width: 20%
   }
   li a {

	font-size: 15px;
    line-height: 2;
}
}
</style>

</head>
<body>

<div class="Header">
<div class="logo">
<img src="https://1.bp.blogspot.com/-4m_nJYxnWWQ/X8ndVPH8l8I/AAAAAAAABO8/
fQj64VedI6Qkh2l5D-sQ2VLeXyShwCKsgCLcBGAsYHQ/w400-h88/cooltext370479803482355.png">	
</div>	
<div class="menu">
<ul class="menu-link">
	<li> <a href=""> Home</a> </li>
	<li> <a href=""> About Us</a> </li>
	<li> <a href=""> Contact Us</a> </li>
	<li> <a href=""> Privacy Policy</a> </li>
</ul>	
</div>
</div>

</body>
</html>

Create a Fixed  Header On Scroll

Many Beautiful Modern Websites have fixed header. When, We do Scroll Down. The header of this type is included in high quality websites. Now, We will Create Fixed Header. 



HTML Code 



<!DOCTYPE html>
<html>
<head>
	<title>Header Design</title>
	<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>

<div class="Header" id="MyHeader">
<div class="logo">
<img src="https://1.bp.blogspot.com/-4m_nJYxnWWQ/X8ndVPH8l8I/AAAAAAAABO8/
fQj64VedI6Qkh2l5D-sQ2VLeXyShwCKsgCLcBGAsYHQ/w400-h88/cooltext370479803482355.png">	
</div>	
<div class="menu">
<ul class="menu-link">
	<li> <a href=""> Home</a> </li>
	<li> <a href=""> About Us</a> </li>
	<li> <a href=""> Contact Us</a> </li>
	<li> <a href=""> Privacy Policy</a> </li>
</ul>	
</div>
</div>
<div class="main-section">
	<img src="https://1.bp.blogspot.com/-R_jVh-Ee7Fs/X_KuIE3ssDI/AAAAAAAAABk/
AUfM-bRDRQ8jQlq6wXzdPiPKGG0RNV9aACLcBGAsYHQ/s320/office-730681%2B%25282%2529.jpg">
	
</div>
<div class="box">
	<div class="box-details">
		<p> We Provide Free Template and Web design details. Anyone Can
                  learn free
                     web development With me.</p>
 
	</div>
	
</div>
<script type="text/javascript">
	
window.onscroll = function() {myFunction()};

var header = document.getElementById("MyHeader");
var sticky = header.offsetTop;

function myFunction() {
  if (window.pageYOffset > sticky) {
    header.classList.add("sticky");
  } else {
    header.classList.remove("sticky");
  }
}
</script>
</body>
</html>


CSS Code 

<style>
body {
	margin: 0;
	padding: 0;
}

.Header {
overflow: hidden;
	width: 100%;
    background-color: #a94e52;
    box-shadow: 0 0 25px 0 rgba(0,0,0,.12);
}

.logo {
	float: left;
}
.logo img{
	line-height: 1px;
}
.menu {

	
	padding-right: 25px;
}
ul {
	list-style-type: none;
	float: right;
}
li {
	padding: 10px;
	float: left;
}
li a {

	font-size: 25px;
	text-decoration: none;
	color: #ffed13;
    font-weight: bold;
}
@media screen and (max-width: 900px) {
   .logo {
      width: 20%
   }
   li a {

	font-size: 15px;
    line-height: 2;
}
}
.sticky {
  position: fixed;
  top: 0;
  width: 100%;
}


.main-section img {

	width: 100%;
    height: 70vh;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    align-items: center;
    margin: 0;
    padding: 0;
}

.box-details p {

	text-align: center;
	padding-bottom: 500px;
}
</style>

 Now we have created HTML CSS and Javascript Code for Fixed header. Embed all three into one and try running.

Full Code of Fixed Header Design



<!DOCTYPE html>
<html>
<head>
	<title>Header Design</title>
	<style>
body {
	margin: 0;
	padding: 0;
}

.Header {
overflow: hidden;
	width: 100%;
    background-color: #a94e52;
    box-shadow: 0 0 25px 0 rgba(0,0,0,.12);
}

.logo {
	float: left;
}
.logo img{
	line-height: 1px;
}
.menu {

	
	padding-right: 25px;
}
ul {
	list-style-type: none;
	float: right;
}
li {
	padding: 10px;
	float: left;
}
li a {

	font-size: 25px;
	text-decoration: none;
	color: #ffed13;
    font-weight: bold;
}
@media screen and (max-width: 900px) {
   .logo {
      width: 20%
   }
   li a {

	font-size: 15px;
    line-height: 2;
}
}
.sticky {
  position: fixed;
  top: 0;
  width: 100%;
}


.main-section img {

	width: 100%;
    height: 70vh;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    align-items: center;
    margin: 0;
    padding: 0;
}

.box-details p {

	text-align: center;
	padding-bottom: 500px;
}
</style>
</head>
<body>

<div class="Header" id="MyHeader">
<div class="logo">
<img src="https://1.bp.blogspot.com/-4m_nJYxnWWQ/X8ndVPH8l8I/AAAAAAAABO8/
fQj64VedI6Qkh2l5D-sQ2VLeXyShwCKsgCLcBGAsYHQ/w400-h88/cooltext370479803482355.png">	
</div>	
<div class="menu">
<ul class="menu-link">
	<li> <a href=""> Home</a> </li>
	<li> <a href=""> About Us</a> </li>
	<li> <a href=""> Contact Us</a> </li>
	<li> <a href=""> Privacy Policy</a> </li>
</ul>	
</div>
</div>
<div class="main-section">
	<img src="https://1.bp.blogspot.com/-R_jVh-Ee7Fs/X_KuIE3ssDI/AAAAAAAAABk/
AUfM-bRDRQ8jQlq6wXzdPiPKGG0RNV9aACLcBGAsYHQ/s320/office-730681%2B%25282%2529.jpg">
	
</div>
<div class="box">
	<div class="box-details">
		<p> We Provide Free Template and Web design details. Anyone Can
                  learn free
                     web development With me.</p>
 
	</div>
	
</div>
<script type="text/javascript">
	
window.onscroll = function() {myFunction()};

var header = document.getElementById("MyHeader");
var sticky = header.offsetTop;

function myFunction() {
  if (window.pageYOffset > sticky) {
    header.classList.add("sticky");
  } else {
    header.classList.remove("sticky");
  }
}
</script>
</body>
</html>