Solved

closing window and roll over text

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Webpage Not Working in IE 27 366
Saving Form Data when Leaving Page 3 363
Adobe Products Forum? 3 173
.dwt files not viewable in browser - why? 2 144
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 a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

752 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