On 2016-01-29 11:23, haloupek . via wrote:
I'm another dinosaur who has not had much success with CSS. It
bugs me when
browsers stop supporting simple things that work. I also wish I had a way
to change the attributes in a lot of cells at once, instead of redefining
everything in every cell. That really gunks up the code.
Bill Haloupek
Benton County
<grin> I hate CSS too, but in fact it is designed specifically for your
last purpose: to change the attributes in a lot of cells at once instead
of redefining it in every cell.
What you could do is create a cell 'class' in a CSS file which is loaded
in many different pages. As an example, let's say I am creating many
different cemetery pages, each with many rows, and each row has two or
three "date" cells (birth date, death date, burial date). And I want the
dates, oh, I dunno, to display using a monospaced font.
In cemetery.css I would have the following class, which only affects the
<TD> tags:
td.datecell {
font-family: monospace;
}
I make sure the cemetery.css is loaded for every cemetery page. In the
<HEAD> section of each page I add this line:
<link rel="stylesheet" type="text/css"
href="cemetery.css">
In all cemetery tables, every cell which is a date I do this:
<td class="datecell">1 January 1970</td>
Now all dates will print in a monospace. If later on I want to change
all of my cemeteries to center the date in the column, I only need to
edit one file - cemetery.css - so it looks like this:
td.datecell {
font-family: monospace;
text-align: center;
}
--
Wayne Saewyc
Marshall County marshallmnus.genweb.io