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ë15mo ago
Put the numbers in another span and make that one bigger
Jochem
Jochem15mo 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
RikyOP15mo ago
Okay. Thanks
ἔρως
ἔρως15mo 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
Want results from more Discord servers?
Add your server