Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Div, Span, and Table Rows

    I’m trying to apply a style to the text of several rows of a table. I only want to apply the style to some of the rows not all.

    I have tried using the div tag and the span tag but I can’t get the style to apply to the specific rows.

    I did something like this with no luck.

    <span class=”asdf”>
    <tr><td>blah</td><td>blah blah</td></tr>
    <tr><td>fefea</td><td>ffefa</td></tr>
    ………
    </span>

  • #2
    New Coder
    Join Date
    Mar 2005
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you could make a TR class

    <table>
    <tr class="1">
    <td></td>
    </tr>
    <tr></tr>
    </table>

    if that were a real table, class 1 would only be applied in that row. apply class 1 as you see fit, and tada...styled

  • #3
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by s.g.d
    you could make a TR class

    <table>
    <tr class="1">
    <td></td>
    </tr>
    <tr></tr>
    </table>

    if that were a real table, class 1 would only be applied in that row. apply class 1 as you see fit, and tada...styled
    I cant do that because the rows are output from a script. So I would end up with it applyed to every row. I may have to add an if statement when the rows are printed to determin which rows to highlight.

    But I'm not quite ready to give up on the css.

  • #4
    New Coder
    Join Date
    Mar 2005
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hmm, thats over my head then.

    sorry man, good luck


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •