thiruna
asked on
CSS style for Table First Column
Is it possible to apply a CSS style for first column in all tables in General?
table {font-size: 100%; margin-top: 1em; margin-bottom: 0em; width: 100%;}
th {text-align: left; border-bottom: 1px solid Black; margin: .25em; vertical-align: bottom;}
tr {vertical-align: top;}
td {margin: .25em; vertical-align: top; border-bottom: 1px solid #CCCCCC;}
Thanks
table {font-size: 100%; margin-top: 1em; margin-bottom: 0em; width: 100%;}
th {text-align: left; border-bottom: 1px solid Black; margin: .25em; vertical-align: bottom;}
tr {vertical-align: top;}
td {margin: .25em; vertical-align: top; border-bottom: 1px solid #CCCCCC;}
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Using javascript you probably can. You have to lookup each <tr> tag, then lookup each first td or th element.
It will probably work, but would be more work than c&p-ing <col class="firstcol" /> fifteen times...
-r-
It will probably work, but would be more work than c&p-ing <col class="firstcol" /> fifteen times...
-r-
ASKER
The reason I require this to be generalised because...HTML file is like a template and CSS as a style sheet in our office....People here dont care about the interface and they just have feed in the table in the following format....
<table>
<tr><th>sadds</th></tr>
<tr><td>dfddsfds</td></tr>
<tr><td>dfddsfds</td></tr>
<tr><td>dfddsfds</td></tr>
<tr><td>dfddsfds</td></tr>
<tr><td>dfddsfds</td></tr>
</table>
and our CSS will do the rest ....
Any help or Suggestions???
Thanks in advance
Thiru
<table>
<tr><th>sadds</th></tr>
<tr><td>dfddsfds</td></tr>
<tr><td>dfddsfds</td></tr>
<tr><td>dfddsfds</td></tr>
<tr><td>dfddsfds</td></tr>
<tr><td>dfddsfds</td></tr>
</table>
and our CSS will do the rest ....
Any help or Suggestions???
Thanks in advance
Thiru
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your help... but this script highlights only the first cell of every table. I want to highlight the entire first column of all table....
Thanks
Thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry, misunderstood. Thanks Roonaan. :)
-Doug
-Doug
ASKER
I have around 10 to 15 tables in a single file and I donnt want to go to every table and write the Col tag. I just to write it the CSS style file and browser should apply this style for first column in all table in html file...is that possible or can it obtained using Javascript...
Thanks