enjoylife enjoylife - 1 month ago 23
CSS Question

make the first character uppercase in css

is there a way to make the first character uppercase in the a label in css.
the html structure is

<a class="m_title" href="">gorr</a>
<a class="m_title" href="">trro</a>
<a class="m_title" href="">krro</a>
<a class="m_title" href="">yrro</a>
<a class="m_title" href="">gwwr</a>


There's a property for that:

a.m_title {
    text-transform: capitalize;

If your links can contain multiple words and you only want the first letter of the first word to be uppercase, use :first-letter with a different transform instead (although it doesn't really matter). Note that in order for :first-letter to work your a elements need to display as blocks:

a.m_title {
    display: block;

a.m_title:first-letter {
    text-transform: uppercase;