...

View Full Version : css text decoration none



durangod
12-24-2010, 05:13 AM
Hi, i am using javascript popup window open for a help link but for some reason even if i use the text decoration none clause in css it still show the word HELP with an underline..
im perplexted alittle ..

did i do this right




.help a{
text-decoration: none;
}

.help{
font-size: 19px;
color: #134977;
font-weight:bold;
text-decoration: none;
}

DJCMBear
12-24-2010, 05:34 AM
Are you adding this css to the window with javascript or are you calling a url into the pop-up window?

durangod
12-24-2010, 09:04 AM
im doing it like this



<a href="javascript: void(0);" onClick="javascript:popup = window.open('help.html','Help1','status=0,menubar=0,resizable=1,scrollbars=1,width=500,height=400'); gethelpnow();"><h3><span class="help">Help</span></h3></a>

sarenarichard
12-24-2010, 10:41 AM
Use the javascript in header, removing a href tag and try.

coothead
12-24-2010, 10:51 AM
Hi there durangod,

it is not permissible to place a block level element - "h3" within an inline element - "a". :eek:

Also note that those with javascript disabled will not be able to view your help.html page.

I would suggest that you code it something like this...


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="language" content="english">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">

<title> pop-up link</title>

<style type="text/css">
#mylink {
font-size: 19px;
color: #134977;
font-weight:bold;
text-decoration: none;
}
</style>

<script type="text/javascript">

function init(){

var popup;
var features='status=0,menubar=0,resizable=1,scrollbars=1,width=500,height=400';

document.getElementById('mylink').onclick=function() {
if(popup) {
popup.close();
}

gethelpnow();

popup=window.open(this.href,'Help1',features);
popup.focus();
return false;
}
}

function gethelpnow() {
alert('this is the function\n\n gethelpnow()')
}

window.addEventListener?
window.addEventListener('load',init,false):
window.attachEvent('onload',init);

</script>

</head>
<body>

<div>
<a id="mylink" href="help.html">Help</a>
</div>

</body>
</html>

coothead

durangod
12-24-2010, 11:30 AM
thanks coothead, by the way love the username. lmao peace have a great holiday.

coothead
12-24-2010, 11:42 AM
No problem, you're very welcome. ;)
The user name is a perfect description of my pate. :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum