Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





Pages (2): [1] 2 »   Last Thread  Next Thread
Author
Thread Post New Thread   

selection pseudoclasses in Internet Explorer?
 

tomasio




quote this post edit post

IP Loged report this post

Old Post  06-25-04 - 12:17 AM  
hi all,

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

here's the code (or visit
http://tomasio.laudatio.com/jobs/Cl.../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"


Post Follow-Up to this message ]
Re: selection pseudoclasses in Internet Explorer?
 

Philipp Lenssen




quote this post edit post

IP Loged report this post

Old Post  06-25-04 - 12:17 AM  
tomasio wrote:

>
> here's the code (or visit
> http://tomasio.laudatio.com/jobs/Cl.../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


Post Follow-Up to this message ]
Re: selection pseudoclasses in Internet Explorer?
 

Steve Pugh




quote this post edit post

IP Loged report this post

Old Post  06-25-04 - 12:17 AM  
tomasio <damnit@jan.et> wrote:

>As I want the color of a:link inside the footer of my page
>(http://tomasio.laudatio.com/jobs/Cl...ted_beauty.html),
>I selected it as descendant element of the div:
>
>here's the code (or visit
>http://tomasio.laudatio.com/jobs/Cl.../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        <steve@pugh.net>        <http://steve.pugh.net/>


Post Follow-Up to this message ]
Re: selection pseudoclasses in Internet Explorer?
 

tomasio




quote this post edit post

IP Loged report this post

Old Post  06-25-04 - 12:17 AM  
"Philipp Lenssen" <info@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"


Post Follow-Up to this message ]
Re: selection pseudoclasses in Internet Explorer?
 

Els




quote this post edit post

IP Loged report this post

Old Post  06-25-04 - 12:17 AM  
tomasio wrote:

> "Philipp Lenssen" <info@outer-court.com> schrieb:
> 
>
> 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 -


Post Follow-Up to this message ]
Re: selection pseudoclasses in Internet Explorer?
 

Neal




quote this post edit post

IP Loged report this post

Old Post  06-25-04 - 12:17 AM  
On Thu, 24 Jun 2004 18:50:56 +0200, tomasio <damnit@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.


Post Follow-Up to this message ]
Re: selection pseudoclasses in Internet Explorer?
 

tomasio




quote this post edit post

IP Loged report this post

Old Post  06-25-04 - 12:17 AM  
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.
 
>
>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"


Post Follow-Up to this message ]
Re: selection pseudoclasses in Internet Explorer?
 

tomasio




quote this post edit post

IP Loged report this post

Old Post  06-25-04 - 12:17 AM  
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"


Post Follow-Up to this message ]
Re: selection pseudoclasses in Internet Explorer?
 

Wolfgang Wildeblood




quote this post edit post

IP Loged report this post

Old Post  06-25-04 - 04:16 AM  
Neal <neal413@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!"


Post Follow-Up to this message ]
Re: selection pseudoclasses in Internet Explorer?
 

Neal




quote this post edit post

IP Loged report this post

Old Post  06-25-04 - 09:15 AM  
On 24 Jun 2004 16:04:42 -0700, Wolfgang Wildeblood
<wolfgangwildeblood@yahoo.com.au> wrote:

> Neal <neal413@yahoo.com> wrote:
> 
>
> Are you saying that if you have the rulesets in this order:
> 
>
> - 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.


Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 04:31 AM. Post New Thread   
Pages (2): [1] 2 »   Previous Last Thread   Next Thread next
Stylesheets archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top