Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- html, body {
- height: 100%; /* required */
- }
- body {
- text-align: center; /* horizontal centering hack for IE */
- padding: 0; /* required to "hide" distance div */
- margin: 0; /* required to "hide" distance div */
- }
- div#distance {
- margin-bottom: -10em; /* half of content height */
- width: 1px; /* required to "hide" distance div */
- height: 50%; /* required */
- float: left; /* required */
- }
- div#content {
- position: relative; /* positions content on top of distance */
- text-align: left; /* horizontal centering hack for IE */
- height: 400px; /* required - desired height */
- width: 500px; /* required - desired width */
- margin: 0 auto; /* required */
- clear: left; /* required */
- }
- </style>
- <body>
- <div id="distance"></div>
- <div id="content">
- Content Here
- </div>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement