Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rollover text 1

Status
Not open for further replies.

Allyson

Technical User
Joined
Oct 4, 2002
Messages
2
Location
US
Hi,

I am trying to acheive a simple rollover effect for links on a page. The links are not an image but text, is it possible to get the colour of the text to change when the mouse is over the link. Its no problem getting it to work with an image as a link but cannot get it to work in text.
Using dreamweaver MX. Thanks in advance .
 
Use style sheets. plenty of tuts on what to do on the net The secret of life is honesty and fair dealing. If you can fake that, you've got it made.
Groucho Marx (1895-1977)
 
A basic CSS style sheet looks like this:

A:link {color:#004080; text-decoration:none;}
A:visited {color:#CCCCCC; tect-decoration:none;}
A:hover {color:#FFFF00; text-decoration:underline;}
A:active {color:#004080; text-decoration:none;}

What this does is, the link will initially be red and not-underlined, when the link has been visited, it will turn gray...when the user hovers over the link, it will turn red and will be underlined...and when if the link is active, it will be red and not underlined...
You can add alot of other features to CSS, such as; font-style, font-size, border-color, etc...do a search on google.com for CSS
Just rememeber that CSS act differently in IE browsers and NS browsers... I have not failed; I merely found 100,000 different ways of not succeding...
 
thanks guys. Do I have to create a CSS sheet, or can just add the effect to the current page I have , I dont really want to create the pages again?
 
You can do either...
Creating a seperate style sheet might prove easier in the future for editing...
To create a seperate style sheet just write the code in a blank file and save it as: somename.css and to call the file in any/all HTML, ASP, CFM, etc. pages, do this:
Code:
<link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;somename.css&quot;>
I have not failed; I merely found 100,000 different ways of not succeding...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top