| Author |
<A> tag color inheritance in IE
|
|
|
| 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
| |
| Barbara de Zoete 2005-09-17, 4:27 am |
| On Sat, 17 Sep 2005 09:17:34 +0200, Rip <ripkrizbi@XXXXXXXXXX> 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...
| |
|
| Beauregard T. Shagnasty wrote:
> Rip wrote:
>
> Your order is out of order. Should be:
>
> a {}
> a:link {}
> a:visited {}
a:focus {}
> a:hover {}
> a:active {}
>
> "Las Vegas Has Animals"
"Las Vegas Forest Has Animals"
(no, that's not a good one, just trying to do a variety on your
version ;-) )
> http://www.safalra.com/special/googlegroupsreply/
Ditto.
--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
| |
| Beauregard T. Shagnasty 2005-09-17, 11:26 pm |
| Els wrote:
> a:focus {}
>
> "Las Vegas Forest Has Animals"
Ah, the elusive focus. <g> I use it with my stylesheets, but most
people overlook it. (Even me, in the last post.)
--
-bts
-This space intentionally left blank.
| |
| Beauregard T. Shagnasty 2005-09-17, 11:26 pm |
| 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.
| |
| 'sNiek 2005-09-17, 11:26 pm |
| Beauregard T. Shagnasty schreef:
> Els wrote:
>
>
>
> Ah, the elusive focus. <g> I use it with my stylesheets, but most
> people overlook it. (Even me, in the last post.)
>
It's truly a shame IE doesn't support it.
--
Niek
| |
|
| 'sNiek wrote:
> Beauregard T. Shagnasty schreef:
>
> It's truly a shame IE doesn't support it.
Oh, really?
http://inspirebc.org.uk/
Tab your way through the links in IE and see what happens.
Even IE5 does it.
--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
| |
| kchayka 2005-09-18, 7:32 pm |
| Els wrote:
> 'sNiek wrote:
>
>
> http://inspirebc.org.uk/
> Tab your way through the links in IE and see what happens.
No WinIE version supports :focus. In this case, it's picking up the
:active pseudo class rather than :focus.
--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
| |
|
| kchayka wrote:
> Els wrote:
>
>
> No WinIE version supports :focus. In this case, it's picking up the
>:active pseudo class rather than :focus.
You're right - just never discovered that 'cause I always use them
both. Thanks for the correction.
--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
| |
| 'sNiek 2005-09-19, 4:33 am |
| Els schreef:
> kchayka wrote:
>
>
>
>
> You're right - just never discovered that 'cause I always use them
> both. Thanks for the correction.
>
You got me puzzling allright, the a:active pseudo class works for IE. Using stuff like input:active doesn't
work though... and that's a shame XXX well.
--
Niek
| |
|
| 'sNiek wrote:
> Els schreef:
>
> You got me puzzling allright,
Sorry :-)
> the a:active pseudo class works for
> IE. Using stuff like input:active doesn't work though... and that's
> a shame XXX well.
True, but at least I already knew that one :\
--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Rico - Carolina
|
|
|
|
| Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |