category:
Technology
Back to Blog Index
CSSで天地中央に配置するテクニック集
CSSでコンテンツを天地中央に配置したい。 そんなときにおすすめなのが、『Vertical Centering With CSS』。CSSで天地中央に配置するテクニック集だ。 このエントリーでは、以下のようなソースで天地中央に配置する例がいくつか紹介されている。
<div id="floater">それぞれにいい点とよくない点が書かれているので参考になるだろう。 CSSで天地中央に配置するテクニック、チェックして一度見ていただきたい。 » Vertical Centering With CSS 今日はちょっと早起きして作業中っと。2月ももうすぐ終わりですねー。
<div id="content">
Content here
</div>
</div> #floater {float:left; height:50%; margin-bottom:-120px;} #content {clear:both; height:240px; position:relative;}