Solved

StyleSheets

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

911 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

22 Experts available now in Live!

Get 1:1 Help Now