need help with Roll over stylesheet.

This is a discussion on "need help with Roll over stylesheet." within the Web Page Design section. This forum, and the thread "need help with Roll over stylesheet. are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 27th, 2004, 14:54
Junior Member
Join Date: May 2004
Location: Kansas City
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
need help with Roll over stylesheet.

Below is a expanded content stylesheet that I'm working on, the expand style sheet works but I can't figured out how to make the link itself a blue state and red when roll over.

<p onClick="expandcontent('sc9')" style="cursor:hand; cursorointer;> How do I make this link blue with red rollover? </p>

I don't think I can use the <a href> tag </a> Please advise if you have a suggestion. Thanks.

-Ott

  #2 (permalink)  
Old Aug 27th, 2004, 15:49
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
what link?
  #3 (permalink)  
Old Aug 27th, 2004, 16:03
Junior Member
Join Date: May 2004
Location: Kansas City
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
In this example the link will be >How do I make this link blue with red rollover?< as seen in the above example. When you roll your mouse over this it will turn the cursor into a hand and when you click on it right now it will expan to the text below with more text notice onClick="expandcontent"

So, the link I want to replicate is the >How do I make this link blue with red rollover?< I want to be able to roll over this with different color. I want to try to replicate it as though it is an a href tag. Thanks.
  #4 (permalink)  
Old Aug 27th, 2004, 16:07
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
cant you use the :hover pseudo class to for the onhover event?
  #5 (permalink)  
Old Aug 27th, 2004, 16:33
Junior Member
Join Date: May 2004
Location: Kansas City
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
I tried but I can't get it to work. How should I use the :hover in the style code? Is it something like this?
<p onClick="expandcontent('sc9')" style="hover: color: #a00c25; cursor:hand; cursorointer;">
  #6 (permalink)  
Old Aug 27th, 2004, 17:22
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
i don't know how to use it in the actual style of the

but you can use it at the top, in the head:

<style>
p.over:hover {

//STYLING

}
</style>

and add the class="over" to the

....
  #7 (permalink)  
Old Aug 27th, 2004, 17:41
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
try this:
Code: Select all
<style type="text/css">
 P#test a { color:blue }
 P#test a:hover { color:red }
</style>

<p id="test">click me</p>
  #8 (permalink)  
Old Aug 27th, 2004, 18:34
Junior Member
Join Date: May 2004
Location: Kansas City
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you both benbarcardi and D3mon, both was good suggestions, but I went with D3mon which seem to work beautifully. Again, both of your comments were great. Thanks.
  #9 (permalink)  
Old Sep 21st, 2004, 02:34
Junior Member
Join Date: Jul 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
You can't use :hover (note the ":") as an inline style. Just take a look at the confusion:

Code: Select all
<p onClick="expandcontent('sc9')" style=":hover: color: #a00c25; cursor:hand; cursor:pointer;">
See the :hover That simply confuses many browsers. Also, you can eliminate "cursor:hand" because "pointer" and "hand" are the same. "hand" is simply an IE add-in (bad M$! )
Closed Thread

Tags
help, roll, stylesheet

Thread Tools

Posting 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Roll Over Images rattlesnak Web Page Design 10 Feb 16th, 2008 01:59
Roll overs? Ideas. PicoDeath Web Page Design 1 Jul 30th, 2007 16:34
Image roll over pop up acrikey Web Page Design 12 May 2nd, 2007 15:31
strtotime() roll over kthompso PHP Forum 0 Jan 22nd, 2007 20:28


All times are GMT. The time now is 09:11.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43