CSS Header Footer

Contents

I created simple web parts with bootstrap.
These are sample codes

Menu Header

HTML

<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="styles/index.css">
<link rel="stylesheet" type="text/css" href="styles/head.css">
</head>
<body>
<header><a href = "header.html"></a>
	<nav class="navbar navbar-default">
		<div class="container-fluid">
			<div class="navbar-header">
				<a class="navbar-brand" href="#">
					<img class="brandicon" alt="Brand" src="images/raffleslunch.png">
				</a>
			</div>
			<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
				<ul class="nav navbar-nav">
					<li class="active"><a href="#">Home</a></li>
					<li><a href="#">Menu</a></li>
				</ul>
	  </div>
	</nav>
</header>
<div class="container">
</div>
</body>
</html>

CSS

html, body {
  height: 100%;
}

body {
 margin: 0px; 
}

.navbar-brand {
	padding: 10px 15px;
}

Result
menu

Simple Header

Header with title and image
HTML


CSS


Result
titleheader

Footer

Fix position footer
I use bootstrap with bower

<html>
<head>
<title>Footer</title>
<link rel="stylesheet" type="text/css" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="styles/index.css">
</head>
<body>
<header>
</header>
<div class="container">
</div>
<footer class="footer">
	<div class="container">
		&copy;atmarkplant
	</div>
</footer>
</body>
</html>

CSS

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 50px;
    background-color: #f5f5f5;
}

footer