We help IT Professionals succeed at work.

:first-line

Isaac
Isaac asked
on
How do I target a paragraph with an id using :first-line?
In my jsFiddle, I have a few paragraphs but I only want to target the one with an id.  See fiddle.

http://jsfiddle.net/isogunro/50kdoxo2/1/

Thanks!
Comment
Watch Question

Most Valuable Expert 2018
Distinguished Expert 2019
Commented:
Just add the ID to your CSS selector:

p#myP::first-line{
  color:red;
}

Open in new window

IsaacSharePoint Client Side Developer

Author

Commented:
Thanks!!