O'Reilly logo

Cascading Style Sheets: The Definitive Guide by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

:first-line — IE4 N/N | IE5 N/Y | NN4 N/N | Op3 Y/-

Synopsis

Applies styles to the first line of an element. The styles are applied even if the window is resized; the text is simply restyled to encompass only the first line of the element.

Example

P:first-line {color: red;}
    <P>The first line of this paragraph is red. blah blah blah...</P>

Values

n/a

Default

n/a

Inherited

yes

Applies to

block

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required