Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

links and classes

0 views
Skip to first unread message

paul schaefer

unread,
Oct 1, 2004, 11:59:11 AM10/1/04
to
i've got a css-menue on my page


#haupt-menue a:link, #haupt-menue a:visited {
color: #b7baab;
text-decoration: none;
}

#haupt-menue a:hover, #haupt-menue a.current {
color: #cc6600;
text-decoration: none;
}

works with ns/firefox

but the links in the menue:
<p><a href="point1.html" class="current">no1</a></p>

don't show the color defined in the css for the 'current' class in ie

any hints?!

greetings

paul schaefer


mscir

unread,
Oct 1, 2004, 5:23:19 PM10/1/04
to
paul schaefer wrote:
> i've got a css-menue on my page
> #haupt-menue a:link, #haupt-menue a:visited {
> color: #b7baab;
> text-decoration: none;
> }
> #haupt-menue a:hover, #haupt-menue a.current {
> color: #cc6600;
> text-decoration: none;
> }

Does this do what you're looking for?

<style type="text/css">
/* a.haupt-menue:link {color: Black; text-decoration: none;} */
/* a.haupt-menue:hover {color: #F6FAAF; text-decoration: none;} */
a.haupt-menue:active {color: #cc6600; text-decoration: none;}
a.haupt-menue:visited {color: #b7baab; text-decoration: none;}
</style>
</head>
<body>
<p><a href="point1.html" class="haupt-menue">no1</a></p>

paul schaefer

unread,
Oct 2, 2004, 7:49:00 AM10/2/04
to
nope

#haupt-menue is a div container with the main menue of the pages
what i want is that one link in this menue (with my'current' class) looks different than the others if the corresponding page is
displayed
so it's not the 'active' state
as i said it works with ns/firefox

paul schaefer


"mscir" <ms...@access4less.net> schrieb im Newsbeitrag news:10lrim8...@corp.supernews.com...

YC

unread,
Oct 2, 2004, 9:50:03 AM10/2/04
to
paul schaefer a écrit :

> i've got a css-menue on my page
>
>
> #haupt-menue a:link, #haupt-menue a:visited {
> color: #b7baab;
> text-decoration: none;
> }
>
> #haupt-menue a:hover, #haupt-menue a.current {
> color: #cc6600;
> text-decoration: none;
> }

My guess would be :
#haupt-menue a:hover, #haupt-menue a.current:link {
etc...
}
otherwise your 'current' link still gets the '#haupt-menue a:link' style
defined above

No ?

paul schaefer

unread,
Oct 2, 2004, 2:02:17 PM10/2/04
to
ok i got some help from http://www.css-discuss.org
because IE gives precedence to the pseudoclass :link over any other class.
i have to use 'id' instead of class to make it work everywhere

so the css of the div container 'haupt-menue' is:

#haupt-menue a:hover, #haupt-menue a#current {

and the link must be:

<p><a href="point1.html" id="current">no1</a></p>

"paul schaefer" <p.sch...@myrealbox.com> schrieb im Newsbeitrag news:2s5d6hF...@uni-berlin.de...

Saeid Mohadjer

unread,
Oct 2, 2004, 10:21:09 PM10/2/04
to
But your earlier code works in IE too. Have a look:

http://www.webserverone.com/saeid/test/test.htm


"paul schaefer" <p.sch...@myrealbox.com> wrote in message
news:2s88p4F...@uni-berlin.de...

0 new messages