Skip to content

Instantly share code, notes, and snippets.

@idevwise
Last active September 10, 2017 16:22
Show Gist options
  • Save idevwise/49ddec668c1c1d5dae39678869eed6e5 to your computer and use it in GitHub Desktop.
Save idevwise/49ddec668c1c1d5dae39678869eed6e5 to your computer and use it in GitHub Desktop.
Fixed position layout
header, footer {
position: fixed;
text-align: center;
width: 100%;
background-color: blue;
color: white;
height: 48px;
line-height: 48px;
}
header {
top: 0;
}
footer {
bottom: 0
}
footer input {
width: 50%;
}
main {
padding: 48px 0;
background-color: yellow;
color: red;
width: 100%;
}
/*To prevent auto-zoom in Safari*/
.safari input[type='text'] {
font-size: 16px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment