PDA

View Full Version : the problem of text color when apply CSS to JS


sonne
12-29-2006, 01:31 AM
the problem when apply CSS to JS
a.css code as follows:
<style type="text/css">
A:link {TEXT-DECORATION:underlined ;COLOR: #039}
A:visited {TEXT-DECORATION: underlined;COLOR: #900000}
A:active {TEXT-DECORATION: none;COLOR: #FF0000}
A:hover {COLOR: #f60}
</style>
<style type="text/css">
<!--
.style12 {
color: #FF6600;
font-size: 12px;
}
.style13 {
color: #FF3300;
font-size: smaller;
font-family: Times New Roman, Times, serif;
}
-->
</style>

a.js code as follows:
document.write(' <CENTER class="style13"> [ <a href="/" target=_blank>Home </a> ] [ <a href="/index/contact.htm" target=_blank>Contact </a> ] _ / <a href="/sport/56/" target="_blank">56</a> / <a href="/sport/53-55/55.html" target="_blank">55</a></CENTER>')

code <LINK REL=StyleSheet HREF="a.css" TYPE="text/css" MEDIA=screen> is inseted in section of <HEAD>
Code <p><script src=/product/js/a.js></script></p> is inserted in body.

Problem:
the text color show in html of "Home" is not #039 (as defined in a.css), but the defaut light blue.
Does anyone know how to solve this problem?

sonne
12-29-2006, 02:20 AM
any one on line?

helixfire
01-05-2007, 06:34 PM
Um. I'm not exactly sure what your talking about.

but this "<style type="text/css">
A:link {TEXT-DECORATION:underlined ;COLOR: #039}
A:visited {TEXT-DECORATION: underlined;COLOR: #900000}
A:active {TEXT-DECORATION: none;COLOR: #FF0000}
A:hover {COLOR: #f60}
</style>"

I think they might be missing Mr. doodad -->; behind the colors.... and LVHA

Link
Visited
Hover
Active

But I need to see what your doing and working with. (IE: browser type, site location...)

so it would be like this...if thats what your talking about?

a:link {
text-decoration: underline;
color: #039;
}

a:visited {
text-decoration: underline;
color: #900000;
}

a:hover {
color: #f60;
}

a:active {
text-decoration: none;
color: #FF0000;
}