Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Hover not working in Safari

Hover not working in Safari
Thread Tools
Fresh-Faced Recruit
Join Date: Sep 2002
Status: Offline
Reply With Quote
Jun 2, 2004, 09:15 PM
 
In IE, hovering over links on my website turns them light blue and underlines them. For whatever reason, this does not work in Safari. Can anybody take a look at the code and tell me what's going on?

http://www.hzfilms.com

Thanks...
     
Mac Elite
Join Date: Mar 2001
Location: Madison, WI
Status: Offline
Reply With Quote
Jun 2, 2004, 09:48 PM
 
Originally posted by jherz:
In IE, hovering over links on my website turns them light blue and underlines them. For whatever reason, this does not work in Safari. Can anybody take a look at the code and tell me what's going on?

http://www.hzfilms.com

Thanks...
Hover used to be an IE-specific attribute until other browsers adopted it to varying degrees. At any rate, IE is still very forgiving when it comes to errors in HTML.

You should change your style from:
Code:
color=#666666; to color: #666666;
You should also consider using an external style sheet...much easier to maintain.
I do not like those green links and spam.
I do not like them, Sam I am.
     
Moderator
Join Date: Mar 2004
Location: Copenhagen
Status: Offline
Reply With Quote
Jun 2, 2004, 10:27 PM
 
Originally posted by Macola:
Hover used to be an IE-specific attribute until other browsers adopted it to varying degrees.
And now, as irony would have it, IE is far behind in its support of hover... who could have known?
     
jherz  (op)
Fresh-Faced Recruit
Join Date: Sep 2002
Status: Offline
Reply With Quote
Jun 2, 2004, 10:54 PM
 
Originally posted by Macola:
You should change your style from:
Code:
color=#666666; to color: #666666;
You should also consider using an external style sheet...much easier to maintain.
That fixed it. Thanks...

So how would I go about setting up an extrernal style sheet?
     
Mac Elite
Join Date: Mar 2001
Location: Madison, WI
Status: Offline
Reply With Quote
Jun 2, 2004, 10:57 PM
 
Originally posted by jherz:
That fixed it. Thanks...

So how would I go about setting up an extrernal style sheet?
Just put all your styles in a file, name it something.css, and in the head of all your html files, reference it like this:

Code:
<link rel="stylesheet" href="something.css" type="text/css">
I do not like those green links and spam.
I do not like them, Sam I am.
     
jherz  (op)
Fresh-Faced Recruit
Join Date: Sep 2002
Status: Offline
Reply With Quote
Jun 2, 2004, 11:10 PM
 
Originally posted by Macola:
Just put all your styles in a file, name it something.css, and in the head of all your html files, reference it like this:

Code:
<link rel="stylesheet" href="something.css" type="text/css">
I can't seem to get this right. If this is what the CSS is on all of my pages, what should my .css text file look like?

p {
font-family: arial;
font-size: 11px;
}
a:link {
text-decoration: none;
color: #666666;
}
a:visited {
text-decoration: none;
color: #666666;
}
a:hover {
text-decoration: underline;
color: #99CCCC;
}
a:active {
text-decoration: underline;
color: #666666;
}
     
Professional Poster
Join Date: Oct 2002
Location: Off the Tobakoff
Status: Offline
Reply With Quote
Jun 2, 2004, 11:22 PM
 
Originally posted by jherz:
I can't seem to get this right. If this is what the CSS is on all of my pages, what should my .css text file look like?
It should look exactly like what you have below the quotation.
"You rise," he said, "like Aurora."
     
jherz  (op)
Fresh-Faced Recruit
Join Date: Sep 2002
Status: Offline
Reply With Quote
Jun 2, 2004, 11:31 PM
 
Originally posted by Stradlater:
It should look exactly like what you have below the quotation.
Okay, I did that, and now it looks ugly as sin. Clearly not working. No idea what I'm doing wrong.
     
Professional Poster
Join Date: Oct 2002
Location: Off the Tobakoff
Status: Offline
Reply With Quote
Jun 2, 2004, 11:47 PM
 
Originally posted by jherz:
Okay, I did that, and now it looks ugly as sin. Clearly not working. No idea what I'm doing wrong.
Are you sure you're <link>ing it in the <head>er?
"You rise," he said, "like Aurora."
     
jherz  (op)
Fresh-Faced Recruit
Join Date: Sep 2002
Status: Offline
Reply With Quote
Jun 2, 2004, 11:49 PM
 
Originally posted by Stradlater:
Are you sure you're <link>ing it in the <head>er?
<html>
<head>
<title>HZ Films</title>
<link rel="stylesheet" href="styles.css" type="text/css">
</head>
     
Professional Poster
Join Date: Oct 2002
Location: Off the Tobakoff
Status: Offline
Reply With Quote
Jun 3, 2004, 12:04 AM
 
The news page/frame is looking for the following...

http://www.hzfilms.com/content/news/styles.css

Notice anything?

Other pages will look for the CSS file elsewhere if they're in different directories. In the <link> you might want to include the _whole_ url.
"You rise," he said, "like Aurora."
     
jherz  (op)
Fresh-Faced Recruit
Join Date: Sep 2002
Status: Offline
Reply With Quote
Jun 3, 2004, 09:22 PM
 
Originally posted by Stradlater:
The news page/frame is looking for the following...

http://www.hzfilms.com/content/news/styles.css

Notice anything?

Other pages will look for the CSS file elsewhere if they're in different directories. In the <link> you might want to include the _whole_ url.
Figured it out and everything works perfectly now. Thank you so much.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:34 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2