Home › Forums › CSS › How to target first instance on a page. › Reply To: How to target first instance on a page.
February 10, 2016 at 2:11 am #237896
I’m trying to target the first H1 on a page and make it all caps.
There is no CSS selector to do this as
first/nth is based on the parent.
You need JS/JQ.
$( "h1" ).first().css( "text-transform", "uppercase" );