CSS

CSS のスタイル指定が効かない

現象:
font-weight で、太字にしようとしても太字にならない。

原因:

同じ定義を2回しており、後から書いた方が適用されていた。太字に限らず、CSS は、後に書いた方を優先するようだ。

.post h4 {
    font-size: 0.9em;
    font-weight: bold;

    padding-top: 4px;
    padding-bottom: 4px;
    color: #333333; /* grey */
    font-weight: normal;      /* 2重定義 */
    background-image: url(images/h34_back1.jpg);
    background-repeat: repeat-x;   
    margin-right: 10px;
}

-CSS

Copyright© エンジニアの何でもメモ帳 , 2024 All Rights Reserved.