Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Vertical centering - absolute positioning method
- */
- main {
- position: absolute;
- top: 50%;
- left: 50%;
- margin-top: -3em; /* 6/2 = 3 */
- margin-left: -9em; /* 18/2 = 9 */
- width: 18em;
- height: 6em;
- padding: 1em 1.5em;
- box-sizing: border-box;
- background: #655;
- color: white;
- text-align: center;
- }
- h1 {
- margin: 0 0 .2em;
- font-size: 150%;
- }
- p {
- margin: 0;
- }
- body {
- background: #fb3;
- font: 100%/1.5 sans-serif;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement