i am posting an ad for a snake on a classified ad site, but i am not allowed to use the <body> or <head> tag, therefore i can't put css in the heading or put <body alink="" vlink="">in the code of the ad, i am only able to imput html that is normally conatined between the opening <html> and closing </html> tags. My problem is that i don't want my links to be the default purple and blue. Is there a way for me to put CSS in the body of the ad. Mabey in the <a href="mysite.html">My Site</a> Tag My other option that I didn't know if it would work or not: can i link in a <div> tag to a style sheet that is hosted on my personal webiste? for example <div style="http://www.mysite.com/mycss.css"> thank you very much in advance
You should try: <a href="mysite.html" style="color:#red !important;">... For the second question: You have 2 ways to import css styleheets: - using <style type="text/css">@import "style.css"; </style> before the body tag - using <link rel="stylesheet' href="style.css" type="text/css" /> before the body tag - or with javascript, but you have to have stylesheets loaded before the body element with <link elements <script type="text/javascript"> function setActiveStyleSheet(title) { var i, a, main; for(i=0; (a = document.getElementsByTagName("link")); i++) { if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) { a.disabled = true; if(a.getAttribute("title") == title) a.disabled = false; } } } </script>
<a href="you.html" onmouseover="this.style.color='blue';" onmouseout="this.style.color='orange';" style="color: orange;">My Link</a> HTML: ??