Move uppercase to lowercase

2

I have a richfaces datatable component that returns a record from the database and this record comes in all capital letters.

Example: PAULO FERNANDES DA SILVA .

Would there be something I could do to edit this name with CSS to Paulo Fernandes Da Silva to be shown in the datatable?

Ps: I'm using HTML4.

    
asked by anonymous 27.10.2016 / 03:45

1 answer

3

One possibility is to convert the name to lowercase before inserting into HTML, and then stylize with text-transform: capitalize ;

var nome = 'PAULO FERNANDES DA SILVA';

document.getElementById('nome').innerHTML = nome.toLowerCase();
#nome {
  text-transform: capitalize;
}
<p id="nome"></p> <!-- Paulo Fernandes Da Silva -->
    
27.10.2016 / 07:16