Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

closing window and roll over text

Posted on 2003-10-27
6
Medium Priority
?
208 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
[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
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 120 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

670 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