|
-
Dec 20th, 2001, 02:18 PM
#1
Thread Starter
Frenzied Member
changing color of text in a div on mouseover
I'm having a little trouble with this.
I have in my style head:
Code:
.catlink {COLOR: #FFFFFF; font-family: Arial, Verdana, Gill Sans, sans-serif; font-size: 8pt; TEXT-DECORATION: none; }
.catlink:hover {COLOR: #999999; font-family: Arial, Verdana, Gill Sans, sans-serif; font-size: 8pt; text-decoration: none; font-weight: none; }
I tried:
Code:
<div id="block_StayPolicy1" class="catlink" onClick="dateChange('1')">11/1/01 - 12/31/02, 1</div>
but that didn't work for mousing over, just with the normal state
then I tried:
Code:
<div id="block_StayPolicy1" onClick="dateChange('1')"><a href=# class="catlink">11/1/01 - 12/31/02, 1</a></div>
but that caused the href=# to fire rather than the onClick
thanks
michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Dec 20th, 2001, 02:27 PM
#2
Thread Starter
Frenzied Member
got it 
Code:
<div id="block_StayPolicy1"><a href="JavaScript:dateChange('1')" class="catlink">11/1/01 - 12/31/02, 1</a></div>
michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Dec 20th, 2001, 02:34 PM
#3
Thread Starter
Frenzied Member
problem
that onclick goes to another page (in a hidden frame) and runs some outer html calls
for some reason when I do that like above it causes the progress bar (in ie5.5, havent tested w/any other) to move across slowly... even though it finishes its task very quickly. it never did that before I implemented the mouseover effect.
any ideas on this?
thanks
michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Dec 20th, 2001, 02:37 PM
#4
Frenzied Member
I don't know why it is affecting progress bar so. That is odd. But I would love to know why exactly the first way you tried didn't work. I would've expected it to.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Dec 20th, 2001, 02:50 PM
#5
Thread Starter
Frenzied Member
I tried it that first way again to be sure it wasnt me... it still didnt work (for mouseover) and the progressbar thing was normal again.
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Dec 20th, 2001, 03:02 PM
#6
Frenzied Member
I got to thinking, maybe the first way you tried would work with a span instead of a div. I don't know if maybe several of the properties you are settting are confined to inline and thus don't work on block level.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Dec 20th, 2001, 03:07 PM
#7
Thread Starter
Frenzied Member
it behaved the same way... wouldent mouseover (or hover rather)
michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Dec 20th, 2001, 07:04 PM
#8
maybe becasue the first one was not a link? it was just a container with words in it.
the second one would have worked but you needed to put the onclick in the <a href> tag.
<div id="block_StayPolicy1" ><a href="#" class="catlink" onClick="dateChange('1')">11/1/01 - 12/31/02, 1</a></div>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|