CSS styling html table columns using <col />, cascade help -
how style 1 column on table not have borders?
i've been using <col/>
tag id can style css. example of css:
#table td, th { vertical-align:middle; text-align:center; font-size:11px; border:1px solid #e0e0e0; } #col { width:300px; border:none !important; }
the above should make every cell in #table have borders, while !important declaration should override cascade above. doing wrong here?
i made below making every <td id="col">
, changing col selector td#col
. felt messy way things, wanted better control on table not inserting id tag every td column.
see http://www.w3.org/tr/css21/tables.html#columns
you not setting border-collapse
property:
the various border properties apply columns if 'border-collapse' set 'collapse' on table element.
then, given:
in case, borders set on columns , column groups input conflict resolution algorithm selects border styles @ every cell edge.
the borders on 2 sides of column still impact:
borders style of 'none' have lowest priority. if border properties of elements meeting @ edge 'none' border omitted (but note 'none' default value border style.)
so you'll end removing top , bottom borders of affected cells.
Comments
Post a Comment