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

    Join Date
    Jun 2001
    Posts
    29
    Rep Power
    0

    Question How do I declare size of my table in CSS?


    I'm not to familiar with CSS but would like to use it on a project i'm working on. Can someone tell me the code to declare a html table size and soforth? Thanking you in advance
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Nov 2001
    Posts
    1,882
    Rep Power
    19
    Here is a simple example.


    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <style type="text/css">
    <!--
    .myTable {
    margin: 0px;
    padding: 0px;
    height: 480px;
    width: 640px;
    border: 1px solid #000000;
    }
    -->
    </style>
    </head>

    <body>
    <table class="myTable">
    <tr>
    <td>&nbsp;</td>
    </tr>
    </table>
    </body>
  4. #3
  5. No Profile Picture
    Senior Citizen
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2001
    Location
    leftcoast
    Posts
    2,019
    Rep Power
    16
    <html>
    <head>
    <title>untitled</title>
    <style type="text/css">

    table {
    width: 608px;
    height: 208px;
    border-collapse: collapse;
    background: saddlebrown;
    }

    td, th {
    width: 200px;
    height: 50px;
    margin: 0px;
    padding: 0px;
    border: 4px gold groove;
    font: 600 24px "comic sans ms",sans-serif;
    color: ivory;
    text-align: center;
    }

    body {
    text-align: center;
    margin-top: 100px;
    background: url(http&#58;//forums.devshed.com/images/icons/icon5.gif);
    overflow: hidden;
    }

    </style>
    </head>
    <body>
    <br>
    <table>
    <tr>
    <td>1</td><td>2</td><td>3</td>
    </tr><tr>
    <td>4</td><td>5</td><td>6</td>
    </tr><tr>
    <td>7</td><td>8</td><td>9</td>
    </tr><tr>
    <td>10</td><td>11</td><td>12</td>
    </tr>
    </table>
    </body>
    </html>

    http://lists.evolt.org/index.cfm/a/h...&orderdir=DESC
    Last edited by adios; October 17th, 2002 at 09:44 PM.

IMN logo majestic logo threadwatch logo seochat tools logo