日々精進

新しく学んだことを書き留めていきます

CSSでposition: absoluteを指定している場合、margin-bottom, margin-rightが効かない

position: absoluteを指定している場合はmarginの指定にmargin-を除いたtop, bottom, left, rightを使わないといけない。 なので以下のようになる。

    position: absolute;
    bottom: 10px;
    right: 5px;

これなんでだろ。。margin-top, margin-leftは効くのになぁ。