< a取代;在IE中标记颜色继承 [英] <A> tag color inheritance in IE
问题描述
你好,有没有办法在IE中解决以下问题:
我有一个由几个div容器组成的布局,每个容器定义一个
单独的字体颜色。我希望链接遵循每个div的颜色方案
,但是在悬停时更改为特定颜色 - 没有
(重新)为每个div定义一个。如果我这样做:
a,a:link,a:visited,a:active {
color:inherit;
font :继承;
text-decoration:none;
}
a:悬停{
颜色:#ffcc33;
}
#menu {
font-size:11px;
font-weight:粗体;
颜色:#dddd;
}
#content {
font-size :12px;
font-weight:normal;
颜色:#cfcfcf;
}
html:
< div id =" menu>
< a href =" http://www.google.com">菜单中的链接< ; / a>
< / div>
< div id =" content">
< a href =" ; http://www.yahoo.com">正文中的链接< / a>
< / div>
FF正确呈现颜色(继承自div ),但IE显示默认(蓝色)颜色的链接
。 IE处于严格模式。
谢谢,
Rip
2005年9月17日星期六09:17:34 +0200,Rip< ri ******* @ gmail.com>写道:
您好,有没有办法在IE中解决以下问题:
a,a:链接,a:已访问,a:有效{
a:悬停{
#menu {
#content {
FF正确渲染颜色(继承自div),但IE显示默认(蓝色)颜色的链接
。 IE处于严格模式。
将样式表中选择器的顺序更改为
#menu {}
#conten {}
a,a:link,a:visited,a:active {}
a:hover {}
所以有继承的东西。
可能会工作,改变级联。未经测试。
-
, - - < - @ - PretLetters:''woest wyf'',遇见vele interesses:---- ------。
|博客| http://home.wanadoo.nl/b。 de.zoete / _private / weblog.html |
| webontwerp | http://home.wanadoo.nl/b。 de.zoete / html / webontwerp.html |
| zweefvliegen | http://home.wanadoo.nl/b。 de.zoete / html / vliegen.html |
` --------------------------- ----------------------- - < - @ ------------''
嗨芭芭拉,
订单没有解决它:( IE链接仍然是蓝色的......
Rip写道:嗨芭芭拉,
命令没有解决它:( IE链接仍然是蓝色的......>
您的订单无序。应该是:
a {}
a:link {}
a:访问{}
a:悬停{}
a:活跃{}
拉斯维加斯有动物
http://www.safalra.com/special/googlegroupsreply/
-
-bts
-这个空间故意留空。 />
Hello, is there a way to get around a following problem in IE:
I have a layout made up of several div containers, each defining a
separate font color. I would like the links to follow the color scheme
of each div, but to change to a particular color when hovered - without
(re)defining a for each div. If I do:
a, a:link, a:visited, a:active {
color: inherit;
font: inherit;
text-decoration: none;
}
a:hover {
color: #ffcc33;
}
#menu {
font-size: 11px;
font-weight: bold;
color: #dcddde;
}
#content {
font-size: 12px;
font-weight: normal;
color: #cfcfcf;
}
html:
<div id="menu>
<a href="http://www.google.com">Link in menu</a>
</div>
<div id="content">
<a href="http://www.yahoo.com">Link in body</a>
</div>
FF renders colors correctly (inherits from a div), but IE shows links
in default (blue) color. IE is in strict mode.
Thanks,
Rip
On Sat, 17 Sep 2005 09:17:34 +0200, Rip <ri*******@gmail.com> wrote:
Hello, is there a way to get around a following problem in IE:
a, a:link, a:visited, a:active {
a:hover {
#menu {
#content {
FF renders colors correctly (inherits from a div), but IE shows links
in default (blue) color. IE is in strict mode.
Change the order of the selectors in your stylesheet to
#menu {}
#conten{}
a, a:link, a:visited, a:active {}
a:hover {}
So there is something to inherit.
Might work, changing the cascade. Not tested.
--
,-- --<--@ -- PretLetters: ''woest wyf'', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------''
Hi Barbara,
order did not solve it :( links are still blue in IE...
Rip wrote:Hi Barbara,
order did not solve it :( links are still blue in IE...
Your order is out of order. Should be:
a {}
a:link {}
a:visited {}
a:hover {}
a:active {}
"Las Vegas Has Animals"
http://www.safalra.com/special/googlegroupsreply/
--
-bts
-This space intentionally left blank.
这篇关于< a取代;在IE中标记颜色继承的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!