How do I stop this from underlining the "Close this window" text?

  • Thread starter Franklin P Patchey
  • Start date
F

Franklin P Patchey

<P><A style="COLOR: rgb(0,0,0); FONT-SIZE: 80%; FONT-FAMILY: 'Comic Sans
MS', cursive; TEXT-

ALIGN: left"
href="javascript:self.close();"><FONT size=4><STRONG>Close this
window!</STRONG></FONT></A></P>
 
L

Lasse Reichstein Nielsen

Franklin P Patchey said:
<P><A style="COLOR: rgb(0,0,0); FONT-SIZE: 80%; FONT-FAMILY: 'Comic Sans
MS', cursive; TEXT-

ALIGN: left"
href="javascript:self.close();"><FONT size=4><STRONG>Close this
window!</STRONG></FONT></A></P>

Lose the FONT and STRONG tags. When you are already using CSS, you might
as well use it for everything.

Don't use javascript: URL's. <URL:http://jibbering.com/faq/#FAQ4_24>

Your font-size:80% and <FONT size=4> are counteracting each other. I
guess the font size ends up as size 4.

<p><a style="color:black;font-family:'PleaseNotComicSans', cursive;
text-align:left;
font-weight:bold;/* same as STRONG */
font-size:large; /* same as size=4 */ "
href="WhyYouNeedJavascriptToUseThisPage.html"
onclick="self.close();">Close this window!</a></p>

(I think the "cursive" font is Comic Sans by default in IE 6. Yikes!)

/L
 
E

Evertjan.

Franklin P Patchey wrote on 09 nov 2003 in comp.lang.javascript:
How do I stop this from underlining the "Close this window" text?
<P><A style="COLOR: rgb(0,0,0); FONT-SIZE: 80%; FONT-FAMILY: 'Comic
Sans MS', cursive; TEXT-ALIGN: left"
href="javascript:self.close();"><FONT size=4><STRONG>Close this
window!</STRONG></FONT></A></P>

This question is not very javascript related, so OT.

=======================

Do not use css font-size and Font declaration together:
Add as style element text-decoration:none;
Use an onclick declaration.
The cursive does not work there.

========

<a style="color:#000;font-size:80%;font-family:'Comic Sans MS';
font-style:italic;font-weight:800;text-align:left;text-decoration:none;"
href="#" onclick="self.close();">
Close this window!
</a>

========

Much better (IMHO) is to use a css declaration list
[I added a hover bgcol.]

========

<style>
a.closeit {
color:#000;font-size:80%;
background-color:transparent;
font-family:'Comic Sans MS';
font-weight:800;font-style:italic;
text-align:left;
text-decoration:none;
}

a:hover.closeit {
background-color:#fe0;
}

</style>


<a class="closeit"
href="#" onclick="self.close();">
Close this window!
</a>

=========
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top