SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Non-Member
    Join Date
    Jan 2004
    Location
    Seattle
    Posts
    4,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Substitute for col/colgroup?

    I understand that not all browsers understand the col/colgroup function. However, I read somewhere that there's a substitute that does work in these browsers. I think they used some sort of system to designate the 1st, 2nd, 3rd column and so on. But I haven't been able to track it down.

    Can anyone tell me how to do this? Thanks.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,877
    Mentioned
    160 Post(s)
    Tagged
    4 Thread(s)
    Hi,

    The col/colgroup which works in all modern browsers as far as I can see.

    http://www.pmob.co.uk/temp/colgroup.htm

    http://www.browsercam.com/public.aspx?proj_id=336188

    Of course css only allows 4 properties to be defined for this: (width,background,border and visibility.)

    In very modern browsers you could use the adjacent selector to style columns.

    e.g. in a 4 column table something like this.

    Code:
    td {background:red}
    td+td {background:green}
    td+td+td {background:blue}
    td+td+td+td {background:yellow}

  3. #3
    Non-Member
    Join Date
    Jan 2004
    Location
    Seattle
    Posts
    4,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's it; thanks.


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
  •