How to select specific tags in a tag

I want to make everything in the div uppercase, except the span that has a "k" in it because it's a small k
No description
4 Replies
Zoë
Zoë8mo ago
Put the numbers in another span and make that one bigger
Jochem
Jochem8mo ago
you cannot select elements based on their text contents in CSS, so you'll have to add a class to the span with k in it
.stat-group {
text-transform: uppercase;
}

.stat-group .stat.notme {
text-transform: none;
}
.stat-group {
text-transform: uppercase;
}

.stat-group .stat.notme {
text-transform: none;
}
Riky
Riky8mo ago
Okay. Thanks
ἔρως
ἔρως8mo ago
a terrible alternative is to use the :first-child selector or, instead of extra classes, you can use a data attribute, like data-unit="k" and target that instead