Solved

StyleSheets

Posted on 2000-05-10
3
349 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 50 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now