The following css changes the color of an a:visited link text located into a tablecell. I would like to change the cell background itself instead of the text background. Is it possible? Thanks for helping. --------- <style> .tablecell a:link,a:active { color: #595984; /* Table cell link text color */ font-size:2.1em; font-weight:bold; } .tablecell a:visited { color: yellow; /* Table cell link text color */ font-size:2.1em; font-weight:bold; background-color:gray; } .tablecell a:hover { color: red; /* Color to change table cell link text to on mouse over */ font-size:2.1em; font-weight:bold; } </style>
Well CSS has no parent selector (a deficiency, in my opinion), so you will have to make do with stretching the link to fit the table cell and changing the background of the <a> element. .tablecell a { display: block; } Code (markup):