user1390754 user1390754 - 1 year ago 103
CSS Question

How to capitalize first line with css? ::first-line psuedo-element CSS not working

Right now I've got a paragraph and I'd like to capitalize the entire first line. I've set the first paragraph to an id "firstp" and tried:

#firstp:first-line {
text-transform: uppercase;

I've tried it with
text-transform: capitalize
but that doesn't work either. It's strange because I've managed to change the first letter (changed font size) using

Answer Source

text-transform on :first-line is really buggy right now, see the reference here

You can use this jquery plugin called linify to select the first line and then apply the property of text-transform: uppercase


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download