Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design Styling numbers wrapped in H tag Reply To: Styling numbers wrapped in H tag

#247876
Shikkediel
Participant

Seems like a perfect use case for a pseudo with counter-increment:

Example

Although reading back your additional description is indeed slightly confusing…

Edit – in retrospect I think I may have misunderstood altogether. Is your question maybe if HTML/CSS can recognise the content of a h element? In that case the answer would be negative. Then again, simplest way would be to give them a common class and style that.

But maybe you could elaborate a bit more on the expected result.

My suggestion above would be a nice alternative for the example page though.

Second edit – this might be an approach too:

http://www.w3schools.com/cssref/sel_firstletter.asp