LoginSignup
0

More than 3 years have passed since last update.

【CSS】メモ

Posted at

dev要素をmarginを使って中央配置にする

containerというidを持つdiv要素を画面中央に置きたい場合、次の通りしていする。
margin:0 auto;で上下が0、左右がオート算出で中央に置かれる。

#container {
      width: 960px;
      height: auto;
      margin: 0 auto;
    }

カーソルがリンクに当たった時浮かび上がらせる

    a:hover{
      text-decoration: none;
      color: #c7c7c7;
    }
<li><a href="#">NEWS</a></li>
<li><a href="#">PROFILE</a></li>
<li><a href="#">DISCOGRAPHY</a></li>
<li><a href="#">MEDIA/LIVE</a></li>
<li><a href="#">CONTACT</a></li>

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0