473,396 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

selection pseudoclasses in Internet Explorer?

hi all,

As I want the color of a:link inside the footer of my page
(http://tomasio.laudatio.com/jobs/Cla...d_beauty.html),
I selected it as descendant element of the div:

here's the code (or visit
http://tomasio.laudatio.com/jobs/Cla...stylesheet.css)

div.Footer a {
color: #f9bddb;
text-decoration: none;
}

a:link {color: #9C1350; text-decoration: none;}
a:visited {color: #9C1350; text-decoration: none;}
a:hover {text-decoration: underline; background-color: #E181AD;
}
a:active {color: Maroon; text-decoration: none;}

---

In Mozilla the color of the link inside div.Footer changes as
expected, but IE seems to ignore this. Is there a way how to achieve
the color change in IE also?

TIA,
--
kind regards,
tomasio
"describing an issue reveals the way to solve it"
Jul 20 '05 #1
10 2273
tomasio wrote:

here's the code (or visit
http://tomasio.laudatio.com/jobs/Cla...stylesheet.css)

div.Footer a {
color: #f9bddb;
text-decoration: none;
}

a:link {color: #9C1350; text-decoration: none;}
a:visited {color: #9C1350; text-decoration: none;}
a:hover {text-decoration: underline; background-color: #E181AD;
}
a:active {color: Maroon; text-decoration: none;}


Not sure what you want to do, but something like this might be a
solution:

a:link,
a:visited,
a:hover,
a:active
{
...
}

a:hover
{
...
}

a.Footer:hover,
a.Footer:link,
a.Footer:visited,
a.Footer:active
{
...
}

Note that CSS is case-sensitive so it must be <div
class="Footer">...</div> in your HTML as well.

--
Google Blogoscoped
http://blog.outer-court.com
Jul 20 '05 #2
tomasio <da****@jan.et> wrote:
As I want the color of a:link inside the footer of my page
(http://tomasio.laudatio.com/jobs/Cla...d_beauty.html),
I selected it as descendant element of the div:

here's the code (or visit
http://tomasio.laudatio.com/jobs/Cla...stylesheet.css)

div.Footer a {
color: #f9bddb;
text-decoration: none;
}

a:link {color: #9C1350; text-decoration: none;}
a:visited {color: #9C1350; text-decoration: none;}
a:hover {text-decoration: underline; background-color: #E181AD;
}
a:active {color: Maroon; text-decoration: none;}
Always set color and background-color together to avoid clashes with
user stylesheets.
In Mozilla the color of the link inside div.Footer changes as
expected, but IE seems to ignore this. Is there a way how to achieve
the color change in IE also?


Same colour in IE6, Opera 7 and Mozilla 1.6. Which version of IE on
which OS is giving you a problem?

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #3
"Philipp Lenssen" <in**@outer-court.com> schrieb:
Not sure what you want to do, but something like this might be a
solution:

a:link,
a:visited,
a:hover,
a:active
{
...
}

a:hover
{
...
}

a.Footer:hover,
a.Footer:link,
a.Footer:visited,
a.Footer:active
{
...
}

Note that CSS is case-sensitive so it must be <div
class="Footer">...</div> in your HTML as well.


Hi philipp,

thank you for your quick response. what i want is to give the
hyperlinks in div.Footer another color than the links in the rest of
the document. regarding to the book of eric meyer (CSS - Definitive
Guide) your approach is correct, but it does not work: neither in
mozilla nor in IE. maybe it has to do something with the cascade, or
that div.Footer is nested in another div?

Most be some stupid issue :(
--
kind regards,
tomasio
"describing an issue reveals the way to solve it"
Jul 20 '05 #4
Els
tomasio wrote:
"Philipp Lenssen" <in**@outer-court.com> schrieb:
Not sure what you want to do, but something like this might
be a solution:

a:link,
a:visited,
a:hover,
a:active
{
...
}

a:hover
{
...
}

a.Footer:hover,
a.Footer:link,
a.Footer:visited,
a.Footer:active
{
...
}

Note that CSS is case-sensitive so it must be <div
class="Footer">...</div> in your HTML as well.


Hi philipp,

thank you for your quick response. what i want is to give
the hyperlinks in div.Footer another color than the links
in the rest of the document. regarding to the book of eric
meyer (CSS - Definitive Guide) your approach is correct,
but it does not work: neither in mozilla nor in IE. maybe
it has to do something with the cascade, or that div.Footer
is nested in another div?

Most be some stupid issue :(


The thing is that a.Footer:link, is not saying anything about
an a element inside a div with class="Footer".

a.Footer means an a element with class="Footer".

If your code in html is like this:

<div class="Footer">
<a href="........">
</div>

Then you need this:

div.Footer a:link,
div.Footer a:visited,
div.Footer a:hover,
div.Footer a:active
{....}

HTH

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jul 20 '05 #5
On Thu, 24 Jun 2004 18:50:56 +0200, tomasio <da****@jan.et> wrote:
thank you for your quick response. what i want is to give the
hyperlinks in div.Footer another color than the links in the rest of
the document. regarding to the book of eric meyer (CSS - Definitive
Guide) your approach is correct, but it does not work: neither in
mozilla nor in IE. maybe it has to do something with the cascade, or
that div.Footer is nested in another div?


If you put the generic link styles after the classed or id'ed or div'ed
ones, they'll supercede. Be sure you have

a:link {}
a:visited {}
a:active {}
a:hover {}

and after it in the styles

div.class a:link {}
div.class a:visited {}
div.class a:active {}
div.class a:hover {}

The first style group changes all links to be something, the second
changes only links in <div class="class"> to be different.
Jul 20 '05 #6
Hi Steve,

Thank you for your quick answer.
Always set color and background-color together to avoid clashes with
user stylesheets.


I set the background-color of "div.Footer a" to "white" and this time
IE reacted correct. There was a white background behind the Link-text.
In Mozilla the color of the link inside div.Footer changes as
expected, but IE seems to ignore this. Is there a way how to achieve
the color change in IE also?


Same colour in IE6, Opera 7 and Mozilla 1.6. Which version of IE on
which OS is giving you a problem?

I am using IE 6 under WinXP Prof. SP1. Are you sure that we are
talking about the same Link? I am referring to the "Top of Page"-Link
at the bottom of the page. The font-color should be a light pink and
thus brighter than its background. IE does the opposite and giving it
the color of the default a:link.

Strange thing, I still don't get the clue :(

--
kind regards,
tomasio
"describing an issue reveals the way to solve it"
Jul 20 '05 #7
I got it! it was the correct ordering of pseudoclasses (div.Footer
a:link after a:link) that spoiled my CSS.

Thank you a lot,
you all safed my day ; )
--
kind regards,
tomasio
"describing an issue reveals the way to solve it"
Jul 20 '05 #8
Neal <ne*****@yahoo.com> wrote:
If you put the generic link styles after the classed or id'ed or div'ed
ones, they'll supercede. Be sure you have

a:link {}
a:visited {}
a:active {}
a:hover {}

and after it in the styles

div.class a:link {}
div.class a:visited {}
div.class a:active {}
div.class a:hover {}

The first style group changes all links to be something, the second
changes only links in <div class="class"> to be different.
Are you saying that if you have the rulesets in this order:
div.class a:link {}
div.class a:visited {}
div.class a:active {}
div.class a:hover {}
a:link {}
a:visited {}
a:active {}
a:hover {}


- they will not have exactly the same effect?

--
"You're too late, my dear!"
Jul 20 '05 #9
On 24 Jun 2004 16:04:42 -0700, Wolfgang Wildeblood
<wo****************@yahoo.com.au> wrote:
Neal <ne*****@yahoo.com> wrote:
If you put the generic link styles after the classed or id'ed or div'ed
ones, they'll supercede. Be sure you have

a:link {}
a:visited {}
a:active {}
a:hover {}

and after it in the styles

div.class a:link {}
div.class a:visited {}
div.class a:active {}
div.class a:hover {}

The first style group changes all links to be something, the second
changes only links in <div class="class"> to be different.


Are you saying that if you have the rulesets in this order:
div.class a:link {}
div.class a:visited {}
div.class a:active {}
div.class a:hover {}
a:link {}
a:visited {}
a:active {}
a:hover {}


- they will not have exactly the same effect?


They SHOULD have the same effect - but there's no guarantee the browser
will respect the cascade. In this specific case it should be fine either
way, but it's smart to be logical just in case.
Jul 20 '05 #10
On 24 Jun 2004 16:04:42 -0700, wo****************@yahoo.com.au (Wolfgang
Wildeblood) wrote:

[...]
Are you saying that if you have the rulesets in this order:
div.class a:link {}
div.class a:visited {}
div.class a:active {}
div.class a:hover {}
a:link {}
a:visited {}
a:active {}
a:hover {}


- they will not have exactly the same effect?


It should not, but why gamble with implementations?

Why not do it correct and without ambigouty?

http://css.nu/faq/ciwas-aFAQ.html#QA08

(note the difference in the order of statements)

--
Rex
Jul 20 '05 #11

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

Similar topics

1
by: RedZebra | last post by:
Hi I am calling and viewing Crystal Reports in internet explorer(using ASP pages) by passing them the selection formula for the main report. Its working fine. The problem is when the report has...
3
by: Sharon | last post by:
Hi y'all, I'm trying to figure out how to tackle this problem: I have an XML table with a cool grid in which users can select a table row. When they right-click on a cell, they get a modal dialog...
5
by: George Hester | last post by:
function spawn(ev){ var oSelect = ''; var oFlag = false; if (ns4 || ns6) oSelect = document.getSelection(); else if (ie4 || ie5){ if (!ev) ev = window.event; oFlag = true; oSelect =...
7
by: Stefan Mueller | last post by:
I choose 'Entry 4' and click then on the button 'Set' to set the index to 'Entry 2'. If you press now the cursor down key 'Entry 5' instead of 'Entry 3' shows up with Mozilla Firefox. With Internet...
3
by: VK | last post by:
Internet Explorer 7 beta 2 preview CNET Editor review: <http://reviews.cnet.com/Internet_Explorer_7_for_XP_SP2_Beta_2/4505-3514_7-31454661-2.html?tag=nl.e415> Summary (my personal review...
3
by: Hartmut Dippon | last post by:
Hi all, I hope somebody can help me with following problem: I have an application where I can drag&drop files/dirs from within explorer onto my form. If multiple files/dirs are selected I...
2
by: dennis.sprengers | last post by:
Ik ben bezig met een eigen UBB editor. Als iemand aan het typen is, zorgt CTRL-B voor een \-tag en nogmaals CTRL-B voor een \ tag. Als je eerst een selectie maakt en dan CTRL-B drukt, wordt de...
5
n8kindt
by: n8kindt | last post by:
hi, i have a selection list that has 150 options in it. in firefox i have no problem with my current set up. when u click on the list box, the menu drops down. but in internet explorer, the menu goes...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.