html - Prevent valign='middle' from being overridden by stylesheet declaration? -
i have table this:
<table> <tr><td valign='middle'><a href='#'>link</a></td><td><img src='img.png'></td></tr> </table>
and stylesheet this:
a { vertical-align: baseline; } td { vertical-align: default; }
i'm trying link veritcally aligned, because of initial vertical-align: baseline
declaration (which cannot change) valign
attribute ignored. i'd fix in stylesheet under td a
selector. how can fix this?
(i testing in chrome 12)
remove valign="middle"
, in stylesheet do:
td { vertical-align: middle; }
since asking how "erase" declaration. can't erase can override it:
a { vertical-align: middle; }
would replace previous declaration in stylesheet.
Comments
Post a Comment