我很难在DIV中覆盖链接颜色。无论我做什么,我最终都会使用CSS的默认链接颜色。我只是没有得到它。提前谢谢 - 任何想法?
在我的CSS底部,我添加了:
#retpopups a:link{
color:#CC0000; !important
background-color:transparent;
text-decoration:none;
font-weight:bold
},
a:visited {
color:#7b3333; !important
background-color:transparent;
text-decoration:none;
font-weight:bold
},
a:hover {
color:#f55c5c; !important
background-color:transparent;
font-weight:bold
},
a:active {
color:#00527a; !important
background-color:transparent;
text-decoration:underline;
font-weight:bold
HTML:
<div id="retpopups" align="center">
<table width="32%" border="0" align="center"title="Data Available">
<tr>`enter code here`
<td>
<a href="#"onclick="MM_openBrWindow
('images/grandview/retail/grandview_rendering.pdf',
'GrandViewRendering','toolbar=yes,location=yes,scrollbars=yes,
resizable=yes,width=600,height=600')">
Rendering</a>
</td>
</tr>
<tr>
<td>
<a href="#"onclick="MM_openBrWindow
('images/grandview/retail/grandview_aerial.pdf',
'Aerial','toolbar=yes,location=yes,scrollbars=yes,resizable=yes,
width=600,height=600')">
Aerial View</a>
</td>
答案 0 :(得分:0)
首先,重要的是需要在风格内部(颜色:#ff0000!important;)修正了这个和逗号的使用,它工作得很好!
#retpopups a:link{
color:#CC0000;
background-color:transparent;
text-decoration:none;
font-weight:bold
}
#retpopups a:visited {
color:#7b3333;
background-color:transparent;
text-decoration:none;
font-weight:bold
}
#retpopups a:hover{
color:#09f;
background-color:transparent;
font-weight:bold;
}
#retpopups a:active {
color:#00527a;
background-color:transparent;
text-decoration:underline;
font-weight:bold;
}