@ import question

liunx

Guest
I have a page whereby I have set the a:link and a:visited for the main menu to be:<br />
A:LINK {<br />
background : #ffffcc;<br />
color : #000000;<br />
text-decoration: underline;<br />
font-size : 1em;<br />
}<br />
<br />
A:VISITED {<br />
background : #ffffcc;<br />
color : #000000;<br />
text-decoration: underline;<br />
font-size : 1em;<br />
}<br />
<br />
However, I would like links in the body of the page to not have the background inherited by the a:visited. I have created an optional class for dealing with the different link within the body with:<br />
A.link{<br />
background : #ffffff;<br />
color : #000000;<br />
font-size : 1em;<br />
text-decoration: underline;<br />
}<br />
Do I need to use the @import to get this to work? If so, how would I do this so that I leave my a:link and a:visited as is? Here is the link if you want to see the page:<br />
<!-- m --><a class="postlink" href="http://personalpages.chorus.net/tomkelly/index.html">http://personalpages.chorus.net/tomkelly/index.html</a><!-- m --><br />
Thanks.<!--content-->I don't see the CSS anywhere in your page. Did you create the css file separately? If so, then to import it, you can do it like so:<br />
<br />
<style type="text/css"><br />
@import url(style_sheet.css);<br />
</style><br />
<br />
or you can use<br />
<br />
<link rel="stylesheet" type="text/css" href=http://www.htmlforums.com/archive/index.php/"stylesheet.css"><br />
<br />
Otherwise, just insert the CSS code you have into your existing style tag.<br />
<br />
I would recommend using a different name for your body links. Perhaps something like body_link. You should try to be descriptive in your naming.<br />
<br />
Doog Xela<!--content-->Thanks for all the help. I resolved problem by doing the following:<br />
<br />
A.link{<br />
background : #ffffff;<br />
background-color : #ffffff;<br />
color : #000000;<br />
font-size : 1em;<br />
text-decoration: underline;<br />
}<br />
A.link:visited{<br />
background : #ffffff;<br />
background-color : #ffffff;<br />
color : #000000;<br />
font-size : 1em;<br />
text-decoration: underline;<br />
}<br />
A.link:hover {<br />
color : #ff0000;<br />
}<br />
<br />
Therefore, whenever I want a link to be different than my main links on the page I use the class=link option. Works great.<!--content-->
 
Back
Top