faqts : Computers : Programming : Languages : JavaScript : Event handling

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

5 of 12 people (42%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

Can I define onMouseOvers and onMouseOuts for links or TD's in a CSS and if so, what is the format?

Jun 19th, 2005 23:56
Techek, InnerPeace Volunteers, http://www.xs4all.nl/~peterned/csshover.html


Yes and no.
You can not define JavaScript/browser-events in CSS, but you can however
take advantage of the :hover functionality in CSS. Remember that most
browsers support :hover on almost all HTML-tags, which might be what
you're looking for.
Trouble is that you can not add JavaScript-functionality using CSS -
that would require use of JavaScript if needed! *s*