14 replies [Last post]
Michael Soetaert
Michael Soetaert's picture
Offline
newbie
Belgium
Last seen: 10 years 4 weeks ago
Belgium
Timezone: GMT+2
Joined: 2010-09-17
Posts: 4
Points: 5

Hi,

I'm making a site with basic CSS-styling,
until now, i didn't have problems,
when i'm on the hyperlink, it's underlined,
and when i have visited the hyperlink, the colour changes.
However, it isn't underlined anymore when i'm on it.

Anyone knows how this comes and how i can solve this problem?

Thanks in advance!

Greets,
Michaël Soetaert

CupidsToejam
CupidsToejam's picture
Offline
Guru
Florida
Last seen: 5 years 6 weeks ago
Florida
Timezone: GMT-4
Joined: 2008-08-15
Posts: 2637
Points: 1556

Its because the giant grape

Its because the giant grape ape is eating up all the rainbows south of the equator. The only way to stop it is to swim with your socks on.

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 3 years 14 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

It probably has something to

It probably has something to do with your CSS.

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

CupidsToejam
CupidsToejam's picture
Offline
Guru
Florida
Last seen: 5 years 6 weeks ago
Florida
Timezone: GMT-4
Joined: 2008-08-15
Posts: 2637
Points: 1556

Michael Soetaert

Michael Soetaert wrote:

...when i'm on the hyperlink, it's underlined,
and when i have visited the hyperlink, the colour changes.
However, it isn't underlined anymore when i'm on it.

You need to take a look at the css for the links. They will look something like this

a {color: #000000;}
a:visited {color: #000000;}
a:hover {color: #000000;}
a:active {color: #000000;}
a:focus {color: #000000;}

If you need further help, you need to show us all your html and css. Please read the posting guidelines before posting.

Michael Soetaert
Michael Soetaert's picture
Offline
newbie
Belgium
Last seen: 10 years 4 weeks ago
Belgium
Timezone: GMT+2
Joined: 2010-09-17
Posts: 4
Points: 5

HTML & CSS code

The HTML-code is like this

<html>
<head>
<title>opmaak hyperlinks</title>
 
<link href="OpmaakHyperlinks.css" rel="stylesheet" type="text/css">
</head>
 
<body>
 
<p><a href="http://www.collegewaregem.be">collegewaregem</a><br>
  <a href="http://www.google.be">google</a> <br>
  <a href="http://www.nmbs.be">nmbs</a> <br>
  <a href="http://www.microsoft.com">microsoft</a><br>
  <a href="http://www.macromedia.com">macromedia</a> </p>
</body>
</html>

and this is the CSS-code

a:link {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #0066CC;
    text-decoration: none;
    font-size: 10pt;
}
a:hover {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10pt;
    color: #0066CC;
    text-decoration: underline;
}
a:visited {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10pt;
    text-decoration: none;
    color: #7711AA;
}

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 18 weeks 4 days ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2043
Points: 2268

Michael Soetaert

Michael Soetaert wrote:

a:visited {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10pt;
    text-decoration: none; <--------------------- Whatdaya think?
    color: #7711AA;
}

Michael Soetaert
Michael Soetaert's picture
Offline
newbie
Belgium
Last seen: 10 years 4 weeks ago
Belgium
Timezone: GMT+2
Joined: 2010-09-17
Posts: 4
Points: 5

Verschwindende

Yes, i've already thought of that,
but then it's underlined all the time and my problem is that it isn't underlined anymore when i'm just standing on it.

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 18 weeks 4 days ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2043
Points: 2268

Michael Soetaert wrote:Yes,

Michael Soetaert wrote:

Yes, i've already thought of that,
but then it's underlined all the time and my problem is that it isn't underlined anymore when i'm just standing on it.

Ah, I see. Well, the problem is you've placed them in a non-standard order. The standard, and dare I say correct, order is:

a:link
a:visited
a:hover
a:active

and I believe :focus goes between :visited and :hover but I never use it.

Michael Soetaert
Michael Soetaert's picture
Offline
newbie
Belgium
Last seen: 10 years 4 weeks ago
Belgium
Timezone: GMT+2
Joined: 2010-09-17
Posts: 4
Points: 5

Yes this worked, thanks alot

Yes this worked,
thanks alot for the help!

coleenh
coleenh's picture
Offline
Regular
Last seen: 10 years 3 weeks ago
Timezone: GMT-6
Joined: 2009-09-02
Posts: 26
Points: 25

I'm having the same problem...

I thought setting the correct order would fix it (thanks for that info btw) but it didn't, so I'll post a thread to show what is happening.

Coleen

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 hour 10 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9772
Points: 3854

[quote=Verschwindende The

Verschwindende wrote:

The standard, and dare I say correct, order is:

a:link
a:visited
a:hover
a:active

and I believe :focus goes between :visited and :hover but I never use it.

But, you should. Folks navigating via the keyboard depend on :focus to tell them where they are. Most browsers have a default dotted outline, but wouldn't it be better to decide that yourself?

cheers,

gary

ps: You're right, it goes immediately before :hover. --gt

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

CupidsToejam
CupidsToejam's picture
Offline
Guru
Florida
Last seen: 5 years 6 weeks ago
Florida
Timezone: GMT-4
Joined: 2008-08-15
Posts: 2637
Points: 1556

gary.turner

Quote:

a:link
a:visited
a:hover
a:active

Yeah, i said this already, waaaayyyy at the top. Nobody pays attention to me though, thats okay.

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 hour 10 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9772
Points: 3854

CupidsToejam

CupidsToejam wrote:

Yeah, i said this already, waaaayyyy at the top. Nobody pays attention to me though, thats okay.

But, you didn't say this,

Quote:

But, you should. Folks navigating via the keyboard depend on :focus to tell them where they are. Most browsers have a default dotted outline, but wouldn't it be better to decide that yourself?

which was the gist of my post.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 41 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Despite the fact that I can't

Despite the fact that I can't really pay any attention to you, I must just point out the cheating here in the subtle omission in the quoted code of the focus pseudo class evident in the original example but missing from this second example. M'lud I would suggest that the accused stands guilty of wilfully misleading the coding world, and - further - is demonstrating flagrant contempt for this court.. er forum.
oooh made me coffee too strong.

CupidsToejam wrote:
Quote:

a:link
a:visited
a:hover
a:active

Yeah, i said this already, waaaayyyy at the top. Nobody pays attention to me though, thats okay.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 hour 10 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9772
Points: 3854

Wha' dat?

@Hugo: Huh?

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.