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
Solved

StyleSheets

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Decoding Special HTML Characters using Javascript? 2 37
Changing Two Areas of a Page 5 26
alert(innerHTML); 8 32
Help in good tutorials for PHP, HTML and CSS 6 40
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: blockā€¦
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

856 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