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

Tags: css,css-selectors,line,pseudo-element,capitalize

Problem :

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 #firstp:first-letter.

Solution :

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


    CSS Howto..

    How to monitor what the user clicks

    how to make div background image responsive

    How to accomplish onHover event without a second image

    How to conditionally load CSS

    How to move a table(or other content) next to vertical navigation bar

    How to call an HTML css style in a computed text field

    CSS: How to center text over an image, both always centered and proportional regardless of window size

    How can i stop a child div moving towards left when browser size becomes less than webPage size?

    How to stylize left part of input range in Metro Apps?

    How to stretch a div to the viewport bottom without using absolute positioning?

    layout - show the latter coded div at top without absolute positioning

    Showing required fields by bolding

    How to have only a vertical scroll bar on a div

    How to prevent conflicts between css rules

    How to make css overlay hidden while having position as absolute

    Boostrap: How to “stick” a button over an image when re-sizing

    How to toggle a div to slide up and down

    How to use javascript/css to navigate through a pure css carousel/slideshow?

    How to slide down to show content of DIV using CSS/jQuery?

    How to prevent one table from obeying CSS rule

    How can i spin an image -360 degrees and +360 degrees using the -webkit and jQuery?

    How do i center an HTML DIV with logo on the left?

    How to change the css style for phone and desktop?

    How to make CSS fade out but the HTML to collapse

    How can I make responsive image take up 100% of its parent's height?

    Auto-scaled image not shown correctly with IE 10

    How to avoid css overlapping?

    How to completely change the css position of an element on the page to appear in another part of the document flow?

    How do I edit the code of a WordPress site?

    How to show hidden part of an image which is inside a fixed height div, using just the CSS?