473,473 Members | 2,109 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

<A> tag color inheritance in IE

Rip
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

Sep 17 '05 #1
12 2861
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 |
`-------------------------------------------------- --<--@ ------------'
Sep 17 '05 #2
Rip
Hi Barbara,

order did not solve it :( links are still blue in IE...

Sep 17 '05 #3
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.
Sep 17 '05 #4
Els
Beauregard T. Shagnasty wrote:
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: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 -
Sep 17 '05 #5
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.
Sep 17 '05 #6
Beauregard T. Shagnasty schreef:
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.)


It's truly a shame IE doesn't support it.
--
Niek
Sep 17 '05 #7
Els
'sNiek wrote:
Beauregard T. Shagnasty schreef:
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.)


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 -
Sep 17 '05 #8
Els wrote:
'sNiek wrote:
Beauregard T. Shagnasty schreef:
Els wrote:

a:focus {}


It's truly a shame IE doesn't support it.


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.
Sep 18 '05 #9
Els
kchayka wrote:
Els wrote:
'sNiek wrote:
Beauregard T. Shagnasty schreef:
Els wrote:

> a:focus {}

It's truly a shame IE doesn't support it.


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.


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 -
Sep 18 '05 #10
Els schreef:
kchayka wrote:

Els wrote:

'sNiek wrote:
Beauregard T. Shagnasty schreef:

>Els wrote:
>
>
>>a:focus {}

It's truly a shame IE doesn't support it.

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.

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 ass well.
--
Niek
Sep 19 '05 #11
Els
'sNiek wrote:
Els schreef:
kchayka wrote:
Els wrote:
'sNiek wrote:
> Beauregard T. Shagnasty schreef:
>> Els wrote:
>>
>>> a:focus {}
>
> It's truly a shame IE doesn't support it.

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.
You're right - just never discovered that 'cause I always use them
both. Thanks for the correction.


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 ass 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
Sep 19 '05 #12
Els schreef:
the a:active pseudo class works for
IE. Using stuff like input:active doesn't work though... and that's
a shame ass well.

True, but at least I already knew that one :\


And that's why I'm still around in this newsgroup ;-)

--
Niek
Sep 19 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Neil Zanella | last post by:
Hello, I would like to ask how come the design of C++ includes std::pair. First of all I don't think many programmers would use it. For starters, what the first and second members are depends...
2
by: Eshrath | last post by:
Hi, What I am trying to do: ======================= I need to form a table in html using the xsl but the table that is formed is quite long and cannot be viewed in our application. So we are...
2
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script...
11
by: Jamie Burns | last post by:
Hello, I just did a simple benchmark: for (xx=0;xx<100000;xx++) { rDerived* derived = dynamic_cast<rDerived*>(object); if (derived) derived->setValue(message.data.messageSetInt.value); } ...
29
by: John Rivers | last post by:
Hello, What good reason there is for not allowing methods in ASPX pages I can't imagine, but here is how to get around that limitation: (START) <body MS_POSITIONING="FlowLayout"> <form...
8
by: Brian P | last post by:
I want to expose a property of Dictionary<string, MyAbstractClass>. I tried to do it this way: private Dictionary<string, MyChildClass> _dictionary; public Dictionary<string,...
1
by: Michael Primeaux | last post by:
Why does the generic SortedList and generic SortedDictionary not define any virtual members? Thanks, Michael
6
by: nicolas.rolland | last post by:
Would anyone know the reson why IList<Tdoes not implements IList ?? This results in strange behaviours, like typeof(IList).IsAssignableFrom(typeof(List<string>)) --true...
15
by: Grizlyk | last post by:
Hello. Returning to question of manual class type identification, tell me, for ordinary inheritance is C++ garantee that dynamic_cast<Derived*>(Base*) can be implemented similarly to ...
3
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt,...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.