Solved

closing window and roll over text

Posted on 2003-10-27
6
204 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

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…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

773 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