:first-line

Isaac
Isaac used Ask the Experts™
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

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2018
Distinguished Expert 2018
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!!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start Today