alex johnson alex johnson - 23 days ago 7
CSS Question

How to reapply new text format in CSS after removing format initially

Currently having a slight problem with regards to getting my text to appear in a certain way:

I currently have the following:

%><DIV class="quote status">&nbsp;<b>status:&nbsp;</b><%=o.getStatus()%><%


Which returns the following text:


status:CONFIRMED


I have applied the following CSS to remove the uppercase format:

.quote.status{
text-transform: lowercase;
float: right;
}


which returns this:


status:confirmed


However i am unsure how to achieve the following:


Status:Confirmed


using CSS.

Any ideas

Answer

Used capitalize for that:

text-transform: capitalize; /* For First character of each word to uppercase */

text-transform: lowercase; /* For lowercase */

text-transform: uppercase; /* For uppercase */

.quote.status{
    text-transform: capitalize;
    float: right;
}
<div class="quote status">&nbsp;<b>status:&nbsp;</b><%=o.getStatus()%></div>
<br/>
<div class="quote status">&nbsp;<b>status:&nbsp;</b> confirmed</div>