Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to capitalize span elements

Tags:

css

I have two span's held in a given element, with no spaces between them. I want to capitalize the first letter contained in each span. How would I do this?

In this JSFiddle I am using the text-transform rule, but as you see it does not work.

like image 712
Michael Rader Avatar asked Jan 05 '17 09:01

Michael Rader


1 Answers

Add display: inline-block

.first, .second {
    text-transform: capitalize; 
    display: inline-block;
}

Link to fiddle https://jsfiddle.net/9s2f1mrj/2/

like image 162
Deepak Bandi Avatar answered Oct 17 '22 22:10

Deepak Bandi