We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38930
    • 19 Posts
    Hi everyone,
    I've this problem: I want to extract the first letter of the content placeholder and at the same time I want to have the same content without the first letter.
    I need format the first letter of every content automaticaly with another size and color....

    thanks in advance....
      • 19369
      • 1,098 Posts
      You can do this with CSS:
      #content:first-letter {
          font-size: 40px;
          color: red;
      }

      HTML sample:
      <div id="content">Lore ipsa ipsum</div>


      You may have to adjust the css, depending on what html element you have at the beginning of the content page (for example if you have a "p" tag, a "h1" tag, etc).
      CSS example:
      #content p:first-child:first-letter {
          font-size: 40px;
          color: red;
      }

      HTML sample:
      <div id="content">
          <p>Lore ipsa ipsum</p>
          <p>Lore ipsa ipsum</p>
          <p>Lore ipsa ipsum</p>
          <p>Lore ipsa ipsum</p>
          <p>Lore ipsa ipsum</p>
      </div>
      [ed. note: microcipcip last edited this post 14 years, 4 months ago.]
        • 38930
        • 19 Posts
        great!! thanks