SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2001
    Location
    glasgow
    Posts
    104
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Provlem with TD background-color

    Hi,

    I've being trying to the the background-color of td cells in my table, but don't seem to be able to. I have a background-color set for the table and one set for th cells, both of which work (all using an external style sheet).

    Additionally is it possible to set the class for a table and then assign style properties to cells without specifically assigning a class/style to each row/cell/group etc.. eg <table class="a"> cells with one format, <table class="b"> with cells haveing another format?

    I've uploaded a page and the style sheet -
    http://www.glasgowaccies.cc/test/test.html

    Thanks in advance,

    Fraser

  2. #2
    SitePoint Enthusiast Grubilo's Avatar
    Join Date
    Oct 2002
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sure, you can assign attributes to all cells.
    Add this code to your stylesheet:

    Code:
    td {
       background-color: #ffffff;
    }
    Web tutorials
    http://webclass.ru

  3. #3
    SitePoint Enthusiast JohnShaft's Avatar
    Join Date
    Oct 2002
    Location
    England
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One thing I've not been able to do is assign styles to Table ROWS. Is this not possible, or am I just stoopid?
    HorrorExpress.com - all the latest Horror Movie Reviews and News

  4. #4
    SitePoint Enthusiast Grubilo's Avatar
    Join Date
    Oct 2002
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can assign style to any tag. If you want table row then
    write for example:
    Code:
    tr {
       font-weight:bold
    }
    Good luck !
    Web tutorials
    http://webclass.ru

  5. #5
    SitePoint Enthusiast JohnShaft's Avatar
    Join Date
    Oct 2002
    Location
    England
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks I thought you should be able to. It didn't make any sense why I could assign styles to the table, and TDs, but not the TRs.
    I guess I must have just messed something up somewhere and came up with the wrong conclusion.
    HorrorExpress.com - all the latest Horror Movie Reviews and News


Bookmarks

Posting Permissions

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