Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Button Mouseovers...?

Status
Not open for further replies.

WhiteTiger

Programmer
Jun 26, 2001
605
US
I know there is a way, through javascript to make buttons have borders etc when clicked, hovered over, or in the up position...how can I do that in CSS?...

I've tried using the :hover property on a button, but so far, it hasn't worked, any idea why?...also, what else can I do w/ properties of a button reguarding the mouse? ----------------------------------------
Insert attention grabbing signature, which would otherwise provoke a positive emotion here.
 
Not that this is super helpful, but :hover only applies to a (at least I am pretty sure that is the case).

Have you tried putting event="script" type statements in your CSS? Thanks
John

johnmc@mvmills.com
 
Yes, I've used script, and that's eaxctly what I'm trying to get rid of...:-( ----------------------------------------
Luke WhiteTiger to the rescue!X-)
Oldnewbie: "Luke, you must first learn to use the force...correctly."
Virt2001: "Join the dark side"%-(
 
You can't use CSS to create hover effects since those CSS properties called psuedo-classes only apply to the <A> anchor tag. The events that the browser recognizes are part of the DOM(document object model) and not CSS, so your forced to use script.

I have an easy script that does rollover effects for buttons that is crossbrowser compliant and there are no arguments to fill in so all you have to do is place the function in the onmouseover property of the tag.

Contact me if you want it and I'll tell you how to set the style properties easily from script.

Kevin D.
ksdr1@home.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top