SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: CSS - Tables

  1. #1
    SitePoint Member
    Join Date
    Jun 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy CSS - Tables

    I'm a noob with CSS, so I don't know (yet) how to make anything

    So, I thought maybe someone of you could help. My website has about 30 pages, and they all need a color change, so I decided to do it with CSS. I know how to change backround, font and stuff like that, but I'm all confused with tables..

    Is it possible somehow to make a CSS code that has all the properties of one table.. here's how I planned it:


    Backround: #007AF4
    Border: 0
    Cellspacing: 1
    Cell bgcolor: #00366C


    So that makes the Table backround act as a border, only thinner than normal border.

    But how do I include this in a CSS style?

    This would REALLY save time! I mean, if I'd have to change the colours by hand to every page, that would take many hours! If it's in a CSS style, it will take less than minute, and done

    Thanks.
    - - - - - - - -
    P S Y C H O
    P A T H I C

  2. #2
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you give us your website URL to help us better understand the problem?

  3. #3
    SitePoint Member
    Join Date
    Jun 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The pages are on my computer, planning to put them to net, but I have a n example of the table I was planning to use on every page

    Example

    So there.. and I thought it would be easier to just use some smaller code than write all that.. I don't know exactly (actually nothing) but for example:

    <table>
    The text inside the table
    </table>

    (those tags could be something else of course, because i don't know anything about CSS working with HTML) But as that shows, the css file would automatically load the look of that table.. do U understand?

    The table code in CSS would just have all the properties of that table (cellspacing, bgcolor, td bgcolor, stuff like that)

    so when I put <table> (or something else that applyes to CSS) and put the text and close the tag, then the text I wrote would be inside the ready table.

    I don't have any idea if this is even possible, but it's always worth asking.
    Last edited by PsychoPathic; Jun 16, 2002 at 15:41.
    - - - - - - - -
    P S Y C H O
    P A T H I C

  4. #4
    SitePoint Member
    Join Date
    Jun 2002
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can try something like this:

    <html>
    <head>

    <style>

    table
    {
    background: black;
    border: thin solid red;
    }
    td
    {
    background: green;
    }

    </style>

    </head>

    <body>

    <table>
    <tr>
    <td>hello world</td>
    <tr>
    </table>

    </body>

    </html>

    This will show a table with a black background, red border and green cell.
    Kevin Davies
    Webmaster
    3PIE.com free personals
    http://www.3pie.com

  5. #5
    SitePoint Member
    Join Date
    Jun 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wink hmm.. got it

    with

    <style>
    .bodyline { background-color: #2E425A; border: 1px #597795 solid; }
    </style>

    then I put <table class="bodyline">

    and done
    - - - - - - - -
    P S Y C H O
    P A T H I C

  6. #6
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    then I put <table class="bodyline">
    yep thats right.......or was that a rhetorical question.....


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
  •