Skip to content

Instantly share code, notes, and snippets.

@codingwithsara
Created November 9, 2018 04:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codingwithsara/09c4a619f9f3df55ea1ad8e6da69bf2c to your computer and use it in GitHub Desktop.
Save codingwithsara/09c4a619f9f3df55ea1ad8e6da69bf2c to your computer and use it in GitHub Desktop.
How to Create a Simple Website with HTML, CSS, and jQuery ( TypeB: Fixed Header & Footer )
@charset "utf-8";
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700);
/*
============================
Common
============================
*/
body {
margin: 0;
font-family: 'Open Sans', sans-serif;
}
/*
============================
Header
============================
*/
#header {
background-color: navy;
height: 60px;
width: 100%;
position: fixed;
}
ul#menu {
width: 100%;
padding: 0;
margin: 0;
list-style: none;
}
ul#menu li {
float: left;
padding: 20px 0 0 0;
height: 60px;
box-sizing: border-box;
}
li.site_name {
width: 60%;
text-align: left;
}
li.site_name a {
color: white;
text-decoration: none;
padding-left: 30px;
}
li.link {
width: 10%;
text-align: center;
}
li.link a {
color: white;
text-decoration: none;
}
li.site_name a:hover, li.link a:hover {
color: lightcyan;
}
/*
============================
Contents
============================
*/
#contents {
width: 40%;
margin: 0 auto;
padding: 10px 0 130px 0;
}
h1 {
padding-top: 100px;
}
.top {
bottom: 50px;
right: 50px;
position: fixed;
z-index: 100;
color: navy;
}
/*
============================
Footer
============================
*/
#footer {
background-color: navy;
bottom: 0;
width: 100%;
height: 30px;
position: fixed;
box-sizing: border-box;
text-align: center;
color: white;
font-size: 12px;
padding-top: 6px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment