View Full Version : alink color
Aprilrenee 04-12-2004, 01:33 AM Okay this is making me mad, I usually don't have that much problems with css. But my normal link properties or alink will not work its still default underline and blue, everything else in my sheet works. Here is the code, I don't have a link its all on my computer still.
Its in the right place between the head tags, its just the alink that won't work.
<style type="text/css">
A:link
{ text-decoration: underline overline; color:#000000; }
A:visited
{ text-decoration: none; color:#C008CC; }
A:active
{ text-decoration: none; color:#7F1E94; }
A:hover
{ text-decoration: none; color:#F4C0F6;
cursor: move; }
.header {font-family: verdana; font-size: 14pt; background: #C58FD5; border-style:solid; border-color:#ffffff; border-width:2px; color: #652DB1; filter:alpha(style=1, opacity=0, finishopacity=100, startx=0, finishx=100, starty=0, finishy=100); height: 25;}
body
{ background: #F5C0F6;
font-family: verdana, arial;
color: #945696 ;
letter-spacing: 0pt;
font-weight: lighter;
font-size: 9pt;
scrollbar-face-color : #000000;
scrollbar-highlight-color : #000000;
scrollbar-3dlight-color : #000000;
scrollbar-shadow-color : #000000;
scrollbar-darkshadow-color : #000000;
scrollbar-track-color : #000000;
scrollbar-arrow-color : #000000;
margin-top: 0;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
padding-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
}
td
{ background: #EEBEEC;
font-family: verdana, arial;
color: #000000 ;
letter-spacing: 0pt;
font-weight: lighter;
font-size: 7pt;}
</style>
try moving it somewhere else in the head, like above the title or below...
bourdelson 04-12-2004, 01:38 AM Could you post a link to your site so we can see if maybe something else is offsetting it? :)
MaGiCSuN 04-12-2004, 01:48 PM the a:link probably will not work if you have allready visited the link before. Because the A:active and A:visited don't have the text-decoration set to underline overline. So test it with a completely different link, even something that doesn't excist like www.idontexcist.com or something and see what happens then
Love,
Mirna
Aprilrenee 04-12-2004, 05:33 PM Ok I have tried moving it below and above the title even as a an external sheet, and I have tried the different links, all the other properties in the vistied and hover, etc... work just not the alink, I am currently at school, when I will get home I will upload and give you a link so you can all look at the code better.
Thanks
Aprilrenee 04-12-2004, 10:02 PM ok I did a quick upload to my geocities so you can see.
http://www.geocities.com/aprilrenee43/roo/vpurple.htm
As you can see the alink is blue, and I am using an iframe where those 3 links are they are each different and even out of the frame they are blue! and I am using an external sheet, but I have tried one on the same page, its the same code as I posted in the very first post, go ahead and click a link and you will see the other link properities work.
bourdelson 04-12-2004, 10:10 PM Your style.css is wrong...
A:link
{ text-decoration: none; color:#75117B; }
A:visited
{ text-decoration: none; color:#C008CC; }
A:active
{ text-decoration: none; color:#7F1E94; }
A:hover
{ text-decoration: none; color:#F4C0F6;
cursor: move; }
.header {font-family: verdana; font-size: 14pt; background-color: #C58FD5; border-style:solid; border-color:#ffffff; border-width:2px; color: #652DB1; filter:alpha(style=1, opacity=0, finishopacity=100, startx=0, finishx=100, starty=0, finishy=100); height: 25;}
body
{ background: #000000;
background-image: url(purplebg.jpg);
background-repeat: repeat;
font-family: verdana, arial;
color: #945696;
letter-spacing: 0pt;
font-weight: lighter;
font-size: 9pt;
scrollbar-face-color : #000000;
scrollbar-highlight-color : #000000;
scrollbar-3dlight-color : #000000;
scrollbar-shadow-color : #000000;
scrollbar-darkshadow-color : #000000;
scrollbar-track-color : #000000;
scrollbar-arrow-color : #000000;
margin-top: 0;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
padding-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
}
td
{ background: #EEBEEC;
font-family: verdana, arial;
color: #000000 ;
letter-spacing: 0pt;
font-weight: lighter;
font-size: 7pt;}
input, textarea
{ background: #F5C0F6;
font-family: verdana;
color: #000000;
font-size:8pt;
font-weight: lighter;
letter-spacing:0pt; }
Try this. It's without the <html>, <head>, <title>, <style>, and <body> tags. External stylesheets should be the CSS and nothing else. :)
Aprilrenee 04-12-2004, 10:45 PM Thanks, I did not know it worked with out all those tags, its working now! And thank you to everyone else for helping as well.
acsinclair 04-13-2004, 02:16 AM One other thing...links in CSS have to be defined in the following order:
LoVe HAte:
a:link
a:visited
a:hover
a:active
Any other order will cause problems.
Cheers,
Erica
One other thing...links in CSS have to be defined in the following order:
LoVe HAte:
a:link
a:visited
a:hover
a:active
Any other order will cause problems.
Cheers,
Erica
i put my hover after the active definition.
using your stated order, some browsers or versions might not display the hover effect on and active link. i cant recall exactly which one it was at the moment though.
having the hover in last place has not caused any problems with any site i have created.
acsinclair 04-13-2004, 03:15 AM From David Shea (at Messoblue)
Remember “LoVe/HAte” linking.
When specifying link pseudo-classes, always do so in this order: Link, Visited, Hover, Active. Any other order won’t work consistently.
Link to the Site:CSS CRIB SHEET (inspired by the Jakob Nielsen in us all) (http://www.mezzoblue.com/archives/2003/11/19/css_crib_she/index.php)
Hugs,
Erica
i would disagree with thier statement of claim.
i prefer having my hover in last position and it has been consistent.
there are numerous resources on the internet that will show the hover in the 3rd position, and numerous others that show it in the 4th position.
i guess it will be a matter of what you personally believe in and want to use.
bourdelson 04-13-2004, 03:57 PM Thanks, I did not know it worked with out all those tags, its working now! And thank you to everyone else for helping as well.
No problem. Glad you got it to work. :)
pb&j - I have my links in that order too, although usually like this:
a:link, a:active, a:visited {}
a:hover {}
:D
|