SunQuest
           CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 22nd, 2003, 01:02 AM
**PlEaSeHeLp** **PlEaSeHeLp** is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 2 **PlEaSeHeLp** User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
javascipt/html/css problem

I need some help with a javascript/html/css prob I am having...

<font class="sevenwhitearialbold"><a href="blah.html" onmouseover="style.color='black'" onmouseout="style.color='white'">TEXT</a></font>

This code displays black text initially as the class="sevenwhitearialbold" is being ignored.

I want it to start off white like the font class is and onmouseover turn black.

Once I have moved the mouse over the text and moved it off it works fine... its just the first part, making it start off white.

Any ideas?

Reply With Quote
  #2  
Old October 22nd, 2003, 01:19 AM
mrrichardfeder mrrichardfeder is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2001
Posts: 765 mrrichardfeder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 45 sec
Reputation Power: 7
You're using 'CSS' - but not very convincingly.

FONT is deprecated - cya - and CSS styling is the cure for it. Virtually all (almost) current browsers support simple CSS-hover classes for links.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" 
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>untitled</title>
<style type="text/css">

body {
	background: #000;
}
a:link.sevenwhitearialbold {
	font: bold 7pt arial, verdana, helvetica, sans-serif;
	color: #fff; 
}
a:visited.sevenwhitearialbold {
	font: bold 7pt arial, verdana, helvetica, sans-serif;
	color: #fff; 
}
a:hover.sevenwhitearialbold {
	font: bold 7pt arial, verdana, helvetica, sans-serif;
	color: #000; 
}
a:active.sevenwhitearialbold {
	font: bold 7pt arial, verdana, helvetica, sans-serif;
	color: #fff; 
}

</style>
<script type="text/javascript" language="javascript">



</script>
</head>
<body>
<span style="position:absolute;left:200px;top:100px;">
<a class="sevenwhitearialbold" href="blah.html">TEXT</a>
</span>
</body>
</html>

http://www.w3schools.com/css/css_pseudo_classes.asp

http://www.meyerweb.com/eric/css/link-specificity.html

Reply With Quote
  #3  
Old October 22nd, 2003, 01:23 AM
**PlEaSeHeLp** **PlEaSeHeLp** is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 2 **PlEaSeHeLp** User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for your reply - i'am still learning

Thanks for the links as well

Reply With Quote
  #4  
Old October 22nd, 2003, 01:29 AM
mrrichardfeder mrrichardfeder is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2001
Posts: 765 mrrichardfeder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 45 sec
Reputation Power: 7
NP. Hang in there. Read this.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > javascipt/html/css problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway