#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    51
    Rep Power
    12

    CSS table/border problems


    Dear CSS experts....


    I have created a table with the following

    Code:
    <table border="1" width="600px" height="400px" cellpadding="0" cellspacing="0">
    see screenshot.

    However, I would like to have done this using css and I would also prefer a 1px border between all cells. I have tried numerous methods posted on devshed forums to no success.

    Generally they seem to make the table height too large as well as making it look like something a small child would draw.

    Trouble is that the code has become quite complex with the table being generated dynamically using php and many of the td's have been assigned different classes (as i have used stylesheets for the rest of the table).

    Can anyone give me any advice on this please?

    Thanks

    Allan
    Attached Images
  2. #2
  3. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,817
    Rep Power
    1100
    Code:
    <table style="width:600px;height:400px;border:1px solid;border-collapse:collapse;">
    Each <td> should have a style of
    Code:
    border:1px solid
    http://www.w3.org/TR/CSS21/tables.html
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    51
    Rep Power
    12
    Thanks jharnois, that did the job nicely.

IMN logo majestic logo threadwatch logo seochat tools logo