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 5 of 5

Thread: Table-like CSS

  1. #1
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    1
    Thanked 1 Time in 1 Post

    Table-like CSS

    I am trying to accomplish what this website has accomplished: http://www.big-boards.com/kw/basketball/ (Specifically, the part where they list the forum names, that alternate between orange and yellow).

    While I can look at their CSS and make a general conclusion to how they did this, I am wondering if there's a simple example somewhere, someone might know.

    I tried to hand-code a similar thing, but the lines were spaced apart, and I want them to look joined (as in page linked above).

    Thanks!

  • #2
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    Using margin:0;padding:0; in the table's CSS should do the trick to avoid gaps between lines. Is this what you're talking about?

    And the alternating colors are accomplished by using classes "rankline1" and "rankline2" in alternating order on the <tr> tags (which I guess you saw?).

    I'm a little confused about what question you are asking here...
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • #3
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    1
    Thanked 1 Time in 1 Post
    Quote Originally Posted by Rowsdower! View Post
    Using margin:0;padding:0; in the table's CSS should do the trick to avoid gaps between lines. Is this what you're talking about?

    And the alternating colors are accomplished by using classes "rankline1" and "rankline2" in alternating order on the <tr> tags (which I guess you saw?).

    I'm a little confused about what question you are asking here...
    After further examination, I noticed they ARE using tables (at first glance, i didn't think they were).

    Since I know most here are anti-table, is it safe to use tables on projects like such?

  • #4
    Regular Coder
    Join Date
    Oct 2007
    Location
    Glencoe, Ontario, Canada
    Posts
    340
    Thanks
    19
    Thanked 27 Times in 27 Posts
    Using Tables is safe just as long as ur not using it for the site layout, just for tubular data.
    Eric "PitbullMean" Melo
    Always Start your layout with*{border:0; margin:0; padding:0;}
    Be sure to Thank ALL Users who give assistance.

  • #5
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    Quote Originally Posted by PitbullMean View Post
    Using Tables is safe just as long as ur not using it for the site layout, just for tubular data.
    Yeah, what he said... This is one of those rare occassions where it would be semantically appropriate.
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting


  •  

    Posting Permissions

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