Solved

StyleSheets

Posted on 2000-05-10
3
384 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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. …
Find out what you should include to make the best professional email signature for your organization.
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 embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

631 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