View Full Version : external css and link filters/transitions


ReneeZara
10-01-2004, 09:16 PM
Hi all :) I'm Renee, this is my first post. I'm realtively new to css (and webdesign in general - only about a year or so) and I've got 2 questions.

1. First, I'm getting a bit confused with the codes for the link effects. I've tried to look for tutorials on the web, but everyone has their own way of constructing their link codes, and I'd like to know which was is the correct way. In the below example, my confusion is between the two lines in red - what does each of them mean, whats the difference between them and which of the two should I use?

A{color:#FF0088; text-decoration:none; font-weight:bold;}
A:link{color:#333333; text-decoration:none; font-weight:bold;}
A:visited{color:#333333; text-decoration:none; font-weight:bold;}
A:active{color:#FFFF00; text-decoration:underline; font-weight:bold;}
A:hover{color:FF0000; text-decoration:underline; font-weight:bold;}

2. Second question is regarding externall css, which I just started using. While my css was still embedded and part of my html, I could use different link filters and transitions. Now that I've created an external css, the link transitions don't work anymore. I'm using the same code, and the url to the .htc file remained the same, but it still won't work. The other parts of my external css work (scrollbar colors, etc), but not the link transitions. Are external css not made to work with .htc files or is it something else I'm missing? Maybe I put the behavior and filter in the wrong place? This is the code I was using (works with internal, but not external css):

A{color:#FF0088; text-decoration:none; cursor:crosshair; behavior:url(pixel.htc); filter:progid:dximagetransform.microsoft.pixelate( duration=.4, maxSquare=10, enabled=false); height:0px; font-weight:bold;}
A:link{color:#333333; text-decoration:none; font-weight:bold;}
A:visited{color:#333333; text-decoration:none; font-weight:bold;}
A:hover{color:FF0099; text-decoration:none; font-weight:bold; border:1 dashed; border-color:#ff0099;}

Any ideas? Thanx for your help :butterfly:

kittycat
10-01-2004, 09:32 PM
1. You can use 'A' when you want certain attributes to apply to all link, like being bold, a certain colour etc. 'A:link' is for regular links on a page, no attributes in there will be carried over to on hover/visited links.
2. Make sure you have the beginning and end style tags removed from the CSS file, that code looks fine and being in an external stylesheet shouldn't matter (unless you have the mentioned style tags in there)

ReneeZara
10-02-2004, 07:14 PM
Ahhh! Ok, I get the links thing, thank you so much for clarifiying that for me :idea:
Ok, now, as for my second question about the external css and .htc file - everything with my code seems to be in order. The style tags are not in the external css. Can anyone else think of something I might be missing?

kittycat
10-02-2004, 09:39 PM
Just make sure that the htc file is name pixel.htc... other than that I can't see anything wrong with what you've given, can you post a link to the page it's not working on?

ReneeZara
10-05-2004, 04:17 AM
Hi, I figured out what it was - it seems the .htc file was corrupted. I downloaded a new one, and it works!!!
I'm sorry for all the confusion, maybe I should have thought of re-downloading it earlier.
Thank you so much for your help :)