Class applied to col

Giganews Newsgroups
Subject: Class applied to col
Posted by:  emf (emfr…
Date: Fri, 17 May 2013

<html lang="en">
    <meta charset="UTF-8">
    <style type="text/css">
      td { width: 8em; }
      .yll { background:yellow; text-align:center; }
    Table 1
        <td class="yll">1b</td>
        <td class="yll">1d</td>
    Table 2
      <col><col class="yll"><col><col class="yll">

In the code above there are 2 tables each with 4 columns. In the first
table the class .yll is applied directly to the 2nd and 4th cells. In
the second table I try to apply the class to the 2nd and 4th column
instead. Although, however, the respective cells turn yellow, their text
is not centered, Clearly the code has to be applied to the cells, not
the the columns.

I played with:
      col.yll td { background:yellow; text-align:center; }
but that of course doesn't work because the td is not inside the col.

What is the relation of the td to the col, and is there a way to change
the code in the header to make table 2 work?



It ain't THAT, babe! - A radical reinterpretation