1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How do you style numbered comments in an external stylesheet?

Discussion in 'CSS' started by nickr, Jan 3, 2009.

  1. #1
    Let's say I have this:

    <span id="comment-<?php echo $id; ?>" style="text-decoration:none">
    Code (markup):
    How could I move that style into an external stylesheet when each comment has a unique ID number, e.g. comment-1, comment-2, etc. Is it even possible?

    Thanks! :)

    EDIT: I found out elsewhere that the "id" is used for anchor links, so I'd need a class="comment" for styling.
     
    nickr, Jan 3, 2009 IP
  2. Excavator

    Excavator Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    
    <div id="box">
    <span id="comment-<?php echo $id; ?>" style="text-decoration:none">
    </div>
    Code (markup):
    Just to make it more specific you can include the div it's in, I put it in #box for the example.

    
    #box span {
    text-decoration:none
    }
    
    Code (markup):
     
    Excavator, Jan 4, 2009 IP
  3. nickr

    nickr Peon

    Messages:
    106
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That would work, too. Thanks! :)
     
    nickr, Jan 4, 2009 IP