Thread: CSS equivalent

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    Simi Valley, CA
    Posts
    7
    Rep Power
    0

    CSS equivalent


    I like to have most if not all of my tables set up as such:

    <table border="1" cellspacing="0" cellpadding="3" bordercolorlight="000000" bordercolordark="FFFFFF">

    I am pretty new to CSS and was wondering what the CSS equivalent would be so from now on all I would have to do is do this:

    <table class="myTable">

    where the class would be in an external stylesheet. Is this possible? Can these attributes even be DONE in CSS? THANKS
  2. #2
  3. |<.+#f@#+.&.|
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2002
    Location
    norway
    Posts
    3,009
    Rep Power
    1224
    yeah, they can

    .myTable {
    border:1px solid #000000;
    border-spacing:0;
    border-collapse:collapse;
    }

    .myTable td {
    padding:3px;
    }


    http://www.w3.org/TR/CSS2/tables.html#borders
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    Simi Valley, CA
    Posts
    7
    Rep Power
    0
    Thakns Akh,

    That did give me a border and some cellpadding, but the border is not around each individual cell and the borderlight/borderdark is not there. I want to have the borderdark be white and the borderlight be black (i know it's reversed, but it ends up looking good with kind of a 3d look)
  6. #4
  7. |<.+#f@#+.&.|
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2002
    Location
    norway
    Posts
    3,009
    Rep Power
    1224
    .myTable td {
    border:1px solid #000000;
    padding:3px;
    }

    borderdark and borderlight has never been in the w3c's standards,
    and as i never have used i don't know how they act
    but you could try with some of the other border styles,
    http://www.w3.org/TR/CSS2/box.html#b...yle-properties
    just replace solid in with some of the others.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    Simi Valley, CA
    Posts
    7
    Rep Power
    0
    OK I'll play around with it. THANKS!
  10. #6
  11. No Profile Picture
    Java Developer
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    1
    Rep Power
    0
    I found that this worked nicely:
    table {
    border:2px ridge;
    border-collapse: collapse;
    }

    td {
    border:2px ridge;
    border-collapse: collapse;
    }

IMN logo majestic logo threadwatch logo seochat tools logo