ホームページを上 (白) と下 (黒) の 2 つの領域に分割しようとしています。
ページは 50% で垂直に分割されるように意図されており、正常に機能します。
両方の領域にタイトルがあり、上部の白い領域 (タイトルは下側にある必要があります) に対して、下の暗い領域にはタイトルが上側にある必要があります。このように、2 つのタイトルがページの中央に表示されます。
私の唯一の問題は、上部領域のタイトルを下げる方法が見つからないことです。最も速い方法は padding-top と % を使用することでしたが、この方法では、パディングはページの高さではなく幅の % になります。
それを解決する方法はありますか?
HTML
<div>
<div style="height:50%; width:100%; background-color:#FFFFFF">
<a href="http://www.lorenzomeschini.com/architecture"; onMouseOver="this.style.color='#FCB415'" onMouseOut="this.style.color='#cccccc'" style="text-align:center; font-family:Tahoma, Geneva, sans-serif; color:#dddddd; font-size:19px; letter-spacing:0.22em; height:100%">architecture</a>
</div>
<div style="position: absolute; bottom:0;width:100%;height:50%">
<a href="http://www.lorenzomeschini.com/photography"; onMouseOver="this.style.color='#FCB415'" onMouseOut="this.style.color='#cccccc'" style="text-align:center; font-family:Tahoma, Geneva, sans-serif; color:#cccccc; font-size:19px; letter-spacing:0.21em; height:100%">photography</a>
</div>
</div>
</body>
CSS
body {
background-color: #1E1E1E;
margin: 0;
padding: 0;
color: #919191;
font-family: "Courier New", Courier, monospace;
font-size: 13px;
どうもありがとう