A WP theme I am amending has 5 columns, all 5 have a class of span3 mbtm feature
, but they also have classes of first
, 0.25
, 0.5
, 0.75
and last
respectively.
I only want to add CSS to the middle column, how do I target a class that begins with a number?
Check this excellent article by ben frain on the topic: http://benfrain.com/when-and-where-you-can-use-numbers-in-id-and-class-names/
Your css should look like
Although you can escape the characters, imo you should not use it for the sake of readability.
Got to it using
parent > div:nth-of-type(3)