Annedorko, thanks so much for all the help and advice. I found the pull down on the CSS page, I must have been blind because I sure looked for it the first time and I didn’t find it…
My questions/concerns about my table-related CSS are basically because I want to set this up one time and have it work for me throughout. I prefer to have a good foundation to work from.
/* begin styling for table with vertical stripes */
.vert_table {
border-collapse:collapse;
margin-left:auto;
margin-right:auto;}
.vert_table td, .vert_table th {
border:1px solid #5b5b5b;
padding: 2px 5px;}
.vert_table th {
background: #900b0c url('images/tabletread.jpg');
font-weight:bold;
text-align:center;
vertical-align:middle;
color:#ffffff;}
.vert_table tr td {
background-color:#eeeeee;}
.vert_table tr td.alt {
background-color:#dddddd;}
/* end styling for table with vertical stripes */
This is my CSS for a table with vertical stripes. Something like this:
http://tech.bareasschoppers.com/engine/alternate-oil-filters-vtx/
I got the building blocks for this from this page on W3schools:
http://www.w3schools.com/css/tryit.asp?filename=trycss_table_fancy
Based on the problem I had that started this thread and our discussion, would it be smarter for me to change these classes to have the td, th, tr, etc at the beginning?
I have the same question regarding my horizontal striped table:
/* begin styling for table with horizontal stripes */
.horiz_table {
border-collapse:collapse;
text-align:center;
vertical-align:middle;
margin-left:auto;
margin-right:auto;}
.horiz_table td, .horiz_table th {
border:1px solid #5b5b5b;
padding: 2px 5px;}
.horiz_table th {
background: #900b0c url('images/tabletread.jpg');
font-weight:bold;
color:#ffffff;}
.horiz_table tr td {
background-color:#eeeeee;}
.horiz_table tr.alt td {
background-color:#dddddd;}
/* end styling for table with horizontal stripes */
Something like this:
http://tech.bareasschoppers.com/power-commander-pc3-maps/
I’m basically wondering most of this because of the issue I had with my header CSS:
.table_header { /* style for overall table header */
background: #e6e6e6;
font-size: 1.4em;
color: #900b0c;
font-weight:bold;
text-align:center;}
tr td.table_header {
padding: 15px 0;}
Which you were kind enough to help me resolve.
Lastly, I made this special table class because I needed the font to be smaller:
.pc3 {
font-size:0.8em;
border-collapse:collapse;
text-align:center;
vertical-align:middle;
margin-left:auto;
margin-right:auto;}
.pc3 td, .pc3 th {
border:1px solid #5b5b5b;
padding: 3px 2px;}
.pc3 th {
background: #900b0c url('images/tabletread.jpg');
font-weight:bold;
color:#ffffff;}
.pc3 tr td {
background-color:#eeeeee;}
.pc3 tr.alt td {
background-color:#dddddd;}
For this .pc3 class can’t I just use my existing horizontal table class (which is pretty much the same) and only use this .pc3 class to tweak my text?
I know that I can test all this stuff out, so I’m not trying to seem like a freeloader – but my trial and error ends up with code like we discussed above… Sometimes it works, sometimes it doesn’t and sometimes it doesn’t conform to CSS standards.
Thanks again to those who have helped, I’ve really learned a LOT from this discussion so far.