Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

StyleSheets

Posted on 2000-05-10
3
Medium Priority
?
395 Views
Last Modified: 2010-04-09
Hi Everyone.
Im still new to all of this but here goes..
I have set us a style sheet for headings and bulleted points.  What I would like to do is include mouseover and mouseout behaviours into the stylesheet so that if I wanted to create a bullet like this:
<Script>
function On(T)
{
    T.style.color='red';
}
</SCRIPT>

<UL>
    <LI onmouseover="On(this)"> Point no one </LI>
</UL>
I could rather just set it up so that the Script was part of the style sheet which I could then include at the start of my file.
Any ideas on how to get the script into the style sheet?
Idea's would appreciated.
Paulc@microgaming.com
0
Comment
Question by:Mouth
3 Comments
 
LVL 1

Accepted Solution

by:
techy6 earned 150 total points
ID: 2797336
You don't have to use Javascript unless you really want to - you can define the A: (font used on links to other pages / files) classes in your stylesheet, like this:

A:Link { font-family: arial; font-size: 11pt...etc}

then on

A:HOVER {you define how you want a link to look when you hover the mouse over it.  If you don't want it underlined, set text-decoration to 'none'.}

It's easier this way, believe me!


techy6.
0
 
LVL 9

Expert Comment

by:TTom
ID: 2797383
FWIW, A:HOVER only works for IE, don't know about your solution.
0
 

Author Comment

by:Mouth
ID: 2799047
Thanx
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question