CSS: using both linked sheet and inline?

liunx

Guest
I have a page that's linked to a style sheet containing hyperlink properties. I'd like the hyperlinks in one portion of the page to look and behave differently. Though I've never tried using in-line styles before, I've been trying to add in-line style tags into one <P> element. Is this possible? Cause I must be doing it wrong. Wrong syntax or something. If this can be done, what's wrong with this code: <br />
<br />
<p <br />
style=" <br />
a:link { text-decoration: underline; color: blue } <br />
a:visited { text-decoration: none; color: blue } <br />
a:active { text-decoration: none; color: blue } <br />
a:hover { text-decoration: none; color: black }" <br />
<a href=http://www.htmlforums.com/archive/index.php/"abc.htm">blahblah</a> <br />
</p> <br />
<br />
Any help appreciated! <br />
- Paul S<!--content-->ok this is where you need to use classes to apply different styles to different tags,in your style sheet:<br />
<br />
a.name:link { text-decoration: underline; color: blue } <br />
a.name:visited { text-decoration: none; color: blue } <br />
a.name:active { text-decoration: none; color: blue } <br />
a.name:hover { text-decoration: none; color: black }<br />
<br />
<br />
<br />
in your html:<br />
<p><a class="name" href=http://www.htmlforums.com/archive/index.php/"foo.html">link text or image</a></p><br />
<br />
<br />
change name to what you want.<br />
<br />
<br />
:D<!--content-->besides, this is illegal<br />
<br />
<p <br />
style=" <br />
a:link { text-decoration: underline; color: blue } <br />
a:visited { text-decoration: none; color: blue } <br />
a:active { text-decoration: none; color: blue } <br />
a:hover { text-decoration: none; color: black }" <br />
<br />
<br />
you can't put the curly brackets in the html body. and you can't set teh style of tags like that either. listen to Leo as that is the way to go.<!--content-->Hey, thanks guys! I appreciate the help! I'll try your way; it sounds good to me!<br />
<br />
- Paul<!--content-->
 
Back
Top