I want every sentence to begin with a capital letter. What means of css use? text-transform takes up either all or every word .

    4 answers 4

    You can't do this on pure CSS. Either wrap each sentence in a separate div and use the :first-letter pseudo :first-letter , or screw JavaScript.

    • Thank you, I understand everything. Made it so .entry-title :: first-letter {text-transform: capitalize! Important; } - Ratmir Belykh
    • one
      Do not you think that you are doing nonsense? No, there are no complaints to @ fori1ton, he answered your question - he suggested options. But what is the need to load the code with so many divs - one for each sentence? Is not it easier to register with pens? In my opinion, each sentence wrapped in a div - a perversion, and this is putting it mildly! - Astor

    With the help of css only

      Try:

       P:first-letter {text-transform: capitalize;} 
      • And for what I minsanuli? :) Doesn't it work? - Anatoliy

      With css, you can change a string only in block objects, headings and paragraphs.

      We make the first letter of the Capital, in a line in the UTF-8 character encoding format, using PHP:

           $ title = mb_strtoupper (mb_substr ($ content, 0, 1, 'UTF-8'), 'UTF-8').  mb_substr ($ content, 1, null, 'UTF-8');
           echo $ title;
      
      • UTF-8 is not a format, but an encoding. Why is the first letter in this encoding capitalized? - 0xdb
      • Unicode Transformation Format - woodsleaf
      • @woodsleaf 1. For line elements you can use display: inline-block; 2. Why use PHP for this purpose ??? - DaemonHK
      • one
        I checked the span with the display parameter: inline-block; And you know that the respected DaemonHK, did not work. In essence, a site for finding solutions, and I just added. - woodsleaf