simple question (most probably)

Discussion in 'CSS' started by rowen77, Jun 24, 2008.

  1. #1
    Okay I have a list of Names. I want the first letter of each to be enlarged.

    Now can I do this without having to make a class for each Name

    For example

    <p class="enlarge" David >

    <p class="enlarge" John>

    I dont want to repeat that every time.

    Cant I make a div or something to emphasize all the first letters?

    So far tried but failed

    thanks
     
    rowen77, Jun 24, 2008 IP
  2. iamben

    iamben Active Member

    Messages:
    116
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    73
    #2
    .codetoenlargefirstletter p {
    /* Code here */
    }

    <div class="codetoenlargefirstletter">
    <p>David</p>
    <p>John</p>
    </div>


    or whatever. But if you're showing the names in a list, use a list rather than paragraphs.
     
    iamben, Jun 24, 2008 IP