Hey all,
I need to produce many different HTML pages to display heirachal data rowsets, eg, nested tables with a 'parent table' and a 'child table'.
Because these tables need to be 'artisticly correct' with a lot of formatting we have created an external CSS file.
In this CSS file we have 2 classes, .parentTable and .childTable, and then the HTML tages like TH, THEAD, TBODY, TD, etc all have their formatting.
EG:
.parentTable TD
{
HEIGHT:25px;
BORDER-RIGHT: #003366 0pt;
BORDER-LEFT: #003366 1pt solid;
BORDER-TOP: #003366 2pt solid;
BORDER-BOTTOM: #003366 0pt;
PADDING:0px 5px
}
First of all I must say that this method is absolutly awsome, it will save sooo much time becaue in my HTML code all I say is <TABLE class="parentTable"> and it is rendered exactly how I want.
My problem is that I want more control then this tho, I want to be able to say that "if the TD is in the first column of the table then" BORDER-LEFT: #003366 3pt solid; "else" BORDER-LEFT: #003366 1pt solid; or "if the TD is in the first row of TBODY of the table then BORDER-TOP: #003366 0pt solid; "else" BORDER-TOP: #003366 1pt solid;
Can someone please tell me if this is possable, and if so, how (or provide a pointer to a good web site/book on this subject!)
Thanks in advance!
I need to produce many different HTML pages to display heirachal data rowsets, eg, nested tables with a 'parent table' and a 'child table'.
Because these tables need to be 'artisticly correct' with a lot of formatting we have created an external CSS file.
In this CSS file we have 2 classes, .parentTable and .childTable, and then the HTML tages like TH, THEAD, TBODY, TD, etc all have their formatting.
EG:
.parentTable TD
{
HEIGHT:25px;
BORDER-RIGHT: #003366 0pt;
BORDER-LEFT: #003366 1pt solid;
BORDER-TOP: #003366 2pt solid;
BORDER-BOTTOM: #003366 0pt;
PADDING:0px 5px
}
First of all I must say that this method is absolutly awsome, it will save sooo much time becaue in my HTML code all I say is <TABLE class="parentTable"> and it is rendered exactly how I want.
My problem is that I want more control then this tho, I want to be able to say that "if the TD is in the first column of the table then" BORDER-LEFT: #003366 3pt solid; "else" BORDER-LEFT: #003366 1pt solid; or "if the TD is in the first row of TBODY of the table then BORDER-TOP: #003366 0pt solid; "else" BORDER-TOP: #003366 1pt solid;
Can someone please tell me if this is possable, and if so, how (or provide a pointer to a good web site/book on this subject!)
Thanks in advance!