Skip to content

Commit

Permalink
Vertically aligning the page
Browse files Browse the repository at this point in the history
  • Loading branch information
qrush committed Apr 3, 2009
1 parent ed7331b commit 8e905a8
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
_site/
*.swp
25 changes: 23 additions & 2 deletions css/screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,34 @@
background: #ddd;
color: #000;
text-align: right;
float: left;
}

#right {
background: #000;
color: #ddd;
left: 50%;
text-align: left;
float: right;
}

#left_bg {
background: #ddd;
color: #000;
}

#right_bg {
left: 50%;
background: #000;
color: #ddd;
}

.bg {
position: absolute;
height: 100%;
width: 50%;
position: absolute;
height: 100%;
}
.middle {
width: 50%;
font-size: 10em;
font-family: Georgia, Times, sans-serif;
Expand All @@ -35,3 +52,7 @@ ul {
ul li {
margin: 10px;
}
.container {top: 0; left: 0; width: 100%; height: 100%;
position: fixed; display: table}
.center {text-align:center; display: table-cell; vertical-align: middle}

46 changes: 26 additions & 20 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,31 @@
</style>
</head>
<body>
<div id="left" class="bg">
jek
<p>
transform your text
</p>
<ul>
<li>code</li>
<li>docs</li>
</ul>
</div>
<div id="right" class="bg">
yll
<p>
into a monster
</p>
<ul>
<li>faq</li>
<li>install</li>
</ul>
</div>
<div id="left_bg" class="bg"></div>
<div id="right_bg" class="bg"></div>
<div class="container">
<div class="center">
<div id="left" class="middle">
jek
<p>
transform your text
</p>
<ul>
<li>code</li>
<li>docs</li>
</ul>
</div>
<div id="right" class="middle">
yll
<p>
into a monster
</p>
<ul>
<li>faq</li>
<li>install</li>
</ul>
</div>
</div>
</div>
</body>
</html>

0 comments on commit 8e905a8

Please sign in to comment.