Solved

closing window and roll over text

Posted on 2003-10-27
6
202 Views
Last Modified: 2010-04-25
hi cant remember the code for closing a window with a button. could someone help me? and also i am wondering how you can create a text rollover that changes the text colour and underlines it.
would be much appreciated
zag
0
Comment
Question by:mickzag
  • 3
6 Comments
 
LVL 8

Expert Comment

by:klykken
ID: 9626682
For a button that closes the window:
<a href="javascript:window.close();"><img src="button.giff" width="70" height="15" border="0" alt="Close Window"></a>

-klykken
0
 
LVL 8

Accepted Solution

by:
klykken earned 30 total points
ID: 9626738
To change colors for for your links, here is a sample html document with the all the CSS needed:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Links</title>
<style type="text/css">
<!--
a:link { color: #333; text-decoration: underline; }
a:visited { color: #333; text-decoration: underline; }
a:hover { color: #369; text-decoration: none; }
a:active { color: #333; text-decoration: underline; }
-->
</style>
</head>
<body>
<a href="#">This is your link </a>
</body>
</html>

-klykken
0
 
LVL 8

Expert Comment

by:klykken
ID: 9627030
Or maybe better if you want to have no underline until the mouse is over the link:

a:link { color: #333; text-decoration: none; }
a:visited { color: #333; text-decoration: none; }
a:hover { color: #369; text-decoration: underline; }
a:active { color: #333; text-decoration: none; }
0
 
LVL 5

Expert Comment

by:boro_bob
ID: 9634655
Even better than that you can write classes for your links, so that you can give different links another set of attributes. This is useful if you have a section with a different bacground to the main page, and the colours you have been using don't look right.

In your style sheet:

<style type="text/css">
<!--
a.className1:link { color: #000000; text-decoration: underline; }
a.className1:visited { color: #000000; text-decoration: underline; }
a.className1:hover { color: #369000; text-decoration: none; }
a.className1:active { color: #333000; text-decoration: underline; }

a.className2:link { color: #ffffff; text-decoration: underline; }
a.className2:visited { color: #ffffff; text-decoration: underline; }
a.className2:hover { color: #369000; text-decoration: none; }
a.className2:active { color: #333000; text-decoration: underline; }
-->
</style>

Then in you html:
<a href="link.htm" class="className1">Link Text</a>

I have found this extremely useful in the past. Hope it helps. Remember you can also declare the font face, font weight, font size, background color etc in the style sheet. Saves a lot of time if you can declare it all once in the style sheet and then simply apply the class to all your links.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
This video discusses moving either the default database or any database to a new volume.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

747 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

11 Experts available now in Live!

Get 1:1 Help Now