The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Web Design
> CSS Help
|
listing of all table-related css variables
Discuss listing of all table-related css variables in the CSS Help forum on Dev Shed. listing of all table-related css variables Cascading Style Sheets (CSS) forum discussing all levels of CSS, including CSS1, CSS2 and CSS Positioning. CSS provides a robust way of applying standardized design concepts to your web pages.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

June 3rd, 2002, 12:44 PM
|
|
matthewdoucette.com
|
|
Join Date: May 2002
Posts: 635

Time spent in forums: 10 h 8 m 16 sec
Reputation Power: 11
|
|
|
listing of all table-related css variables
where can i find a listing of all table-related css variables?
i'm not even sure if there are table-related css variables, but it would be nice to set cellspacing and cellpadding only once at the top of the html file.
thx,
__________________
Matthew Doucette / Xona.com
|

June 3rd, 2002, 01:11 PM
|
|
|
|

June 3rd, 2002, 05:04 PM
|
 |
superficial
|
|
Join Date: Mar 2002
Location: Peterborough, England
Posts: 188
Time spent in forums: 2 h 36 m 8 sec
Reputation Power: 12
|
|
|
__________________
_______________
Matt
|

June 5th, 2002, 08:21 AM
|
|
matthewdoucette.com
|
|
Join Date: May 2002
Posts: 635

Time spent in forums: 10 h 8 m 16 sec
Reputation Power: 11
|
|
|
i'm having problems implementing multiple table css's. i can do it for just one table, like this:
<style>
TABLE
{
border: ffffff 1px solid;
FONT-SIZE: 8pt;
COLOR: ffffff;
FONT-FAMILY: verdana, arial, ms sans serif;
background-color: midnightblue;
}
TH
{
padding: 5px;
border-bottom: ffffff 1px solid;
background-color: darkblue;
}
TD
{
padding: 5px;
background-color: darkblue;
}
-->
</style>
but how do i make seperate table/th/td properties for use in another table?
i know it has something to do with classes (which i have implemented no problem for fonts) but i have no idea how to do it for tables.
|

June 5th, 2002, 09:52 AM
|
|
|
you can assingn a pseudo class to the CSS.
Code:
TD.red { background-color: red}
<td style="red">this is a table cell</td>
You could just use
Code:
.red { background-color: red}
but using TD.red means that you can use the name red for other styles aswell, such as TABLE.red, TH.red etc.
|

June 5th, 2002, 09:59 AM
|
|
matthewdoucette.com
|
|
Join Date: May 2002
Posts: 635

Time spent in forums: 10 h 8 m 16 sec
Reputation Power: 11
|
|
|
so your top example makes all TD's red (by default), and gives you the ability to use .red elsewhere.
and the bottom example makes nothing red, and gives you the ability to use .red elsewhere.
am i right?
so i can't make 2 classes, with each class having 'table', 'th', and 'td' properties all in the same class? in other words, i can't use code such as this: <table class="firstclass" ...> to define properties in 'th' and 'td' as well as 'table'?
|

June 5th, 2002, 10:34 AM
|
|
|
|
TD {background-color: red}
This would effect all TD's.
TD.red {background-color: red}
Using TD.red is a specific class for TD's.
This will only effect TD's that are assigned the class.
e.g. <TD Style="red">
example
----------
<style>
TD {background-color: green}
TD.red {background-color: red}
TD.blue {background-color: blue}
</style>
<table>
<tr>
<td>This cell has no assigned style. It will default to Green</td>
<td style="red">This cell is red</td>
<td style="blue">This cell is blue</td>
</tr>
</table>
Last edited by degsy : June 5th, 2002 at 10:38 AM.
|

June 5th, 2002, 11:12 AM
|
|
matthewdoucette.com
|
|
Join Date: May 2002
Posts: 635

Time spent in forums: 10 h 8 m 16 sec
Reputation Power: 11
|
|
|
excellent, thanks for your help.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|