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?
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?