Tables in CSS ???

This is a discussion on "Tables in CSS ???" within the Web Page Design section. This forum, and the thread "Tables in CSS ??? are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 25th, 2006, 14:22
Junior Member
Join Date: Apr 2006
Age: 27
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Question Tables in CSS ???

I want to have TABLE with different styles in 2 different ".html" pages of my website.

Is it possible to right the code for two different table in one single CSS ???

Right now the table code (for my FORM) is:

Code: Select all
/* ................................... Table ......................................... */

#centerContent table
{
    background-color:black;
    border-spacing:2%;
    margin:3% 3%;
    font-family:Georgia, "Times New Roman", Times, serif;
    text-align:left;
}

#centerContent tr
{
    border:none;
}

#centerContent th
{
    color:fuchsia;
    font-weight:bold;
}

#centerContent td
{
    font-size:medium;
    color:white;
}
As you can see that there's NO border & text are align left, which is what I needed for laying out my "Contact Us" form.

But I need one more table in different page (service.html), which is also linked with the same CSS file.

How could I make new table layout style in the same stylesheet & recall it in "service.html", since here, I want text align "justify" and HAVING border in the rows ???
Reply With Quote

  #2 (permalink)  
Old May 25th, 2006, 20:41
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Tables in CSS ???

In your service.html file give the body tag an id of service then right CSS that is more specific and will therefore take predence over the less specific css.

In sequence, after your #centerContent tr {...

have a #service #centerContent tr {border: 1 solid red;} eg.

Do the same for your table.
Reply With Quote
  #3 (permalink)  
Old May 25th, 2006, 21:10
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to herkalees Send a message via MSN to herkalees Send a message via Yahoo to herkalees
Re: Tables in CSS ???

Quote:
Originally Posted by ukgeoff
In your service.html file give the body tag an id of service then right CSS that is more specific and will therefore take predence over the less specific css.

In sequence, after your #centerContent tr {...

have a #service #centerContent tr {border: 1 solid red;} eg.

Do the same for your table.
Exactly correct. Do this and you'll be minty.
Reply With Quote
Reply

Tags
tables, css

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
omg keep me away from tables !!! HELP!!! bruno89 Web Page Design 5 Jul 1st, 2007 18:33
Use CSS to do what tables do????? WebNinja Web Page Design 17 Feb 18th, 2007 01:07
Why are tables bad? WebNinja Web Page Design 17 Jan 31st, 2007 21:31
No more tables? PicoDeath Web Page Design 9 Sep 28th, 2006 18:03
Tables or CSS? bee_bo Web Page Design 15 Jul 6th, 2006 08:32


All times are GMT. The time now is 22:19.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43