开发者

CSS psuedo-class first-line overrides first-letter

My problem is this, that I 开发者_StackOverflowwant to style the first line and first letter of every paragraph but the first-line attributes move on to the first-letter attributes even if I re-declare them in the declaration of first-letter.

This is how the code looks:


p:first-line {
 font-variant:small-caps;
}
p:first-letter {
 font:none;
 font-variant:none !important;
 font-family: firstLetterFont !important;
 font-size:200%;
 font-weight:bold;
}

The problem is that my custom font (firstLetterFont) is not being used for the first-letter, instead the default Times New Roman is used. I placed !important tags but to no avail.

Anyone have any method of overriding the attributes of first-line?


Oops, sorry, rookie mistake.

Seems there is no such thing as "none" for font-variant, is should be set to "normal".

My bad.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜