Header style question

Discussion in 'CSS' started by bentong, Feb 21, 2006.

  1. #1
    Is it possible to have 2 <h3> tags with different properties?
     
    bentong, Feb 21, 2006 IP
  2. tresman

    tresman Well-Known Member

    Messages:
    235
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    138
    #2
    Sure, use classes:

    <head>
    <style>
    .bigblack {color:#000; font-size:1.8em;letter-spacing:0.2em;text-transform:uppercase}

    .smallwhite {color:#fff; font-size:0.8em;text-decoration:underline}

    </style>
    </head>
    <body>
    <h3 class="bigblack">Big Black Header Here, all uppercase</h3>
    <p>Lore ipsum dolor sit amet...</p>

    <h3 class="smallwhite">small underlined white H3 here</h3>
    <p>Lore ipsum dolor sit amet...</p>
    </body>

    And depending on the situation, you coul also use direrent id's (#).

    Hope this helps.
     
    tresman, Feb 22, 2006 IP
  3. stuw

    stuw Peon

    Messages:
    702
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #3
    or nest your css
    <head>
    <style>
    div#header h3 {color:#000; font-size:1.8em;letter-spacing:0.2em;text-transform:uppercase}

    div#content h3 {color:#fff; font-size:0.8em;text-decoration:underline}

    </style>
    </head>
    <body>
    <div id="header">
    <h3>Big Black Header Here, all uppercase</h3>
    <p>Lore ipsum dolor sit amet...</p>
    </div>
    <div id="content">
    <h3 class="smallwhite">small underlined white H3 here</h3>
    <p>Lore ipsum dolor sit amet...</p>
    </div>
    </body>
     
    stuw, Feb 22, 2006 IP
  4. bentong

    bentong Banned

    Messages:
    3,543
    Likes Received:
    257
    Best Answers:
    0
    Trophy Points:
    0
    #4
    problem now solved. thanks for the reply stuw. yes, different id's. :)
     
    bentong, Feb 22, 2006 IP