Author Topic: Change link style  (Read 11842 times)

TEggHead

  • Jr. Member
  • **
  • Posts: 93
    • ICQ Messenger - 21893433
    • AOL Instant Messenger -
    • Yahoo Instant Messenger - eljarec
    • View Profile
    • Email
Change link style
« Reply #30 on: June 25, 2002, 12:41:14 PM »
quote:

Two things -

I noticed some of you use a.xxx(:xxx), and some use a:xxx(:xxx).
(The () represent extra bits that are optionals (a:hover, a.ftp:link, a.ftp:visited etc).

Does it matter which you use?


it's a matter of scope and class

a.something means apply only to links with class=something
a.something:else means apply only to links with class=something and state=else (hover,visited, etc)

this can be extended to a.something:else:too where :too will then only be applied to links that are in a state of :else (meaning visited, hover, etc)

quote:

Secondly, how come noone uses the !important; at the end, which tells the browser to override the web page css with yours



because most of these definitions apply to classes we made up ourselves, chances of them occuring native to the page are samll, so !important would not be needed...it is something else if you define base styles for tags without any class or id...then the page's native styles may indeed very well overrirde your definitions, in that case !important is very much required to see your defintions become active...

quote:

(there are so many web pages with built in css that overrode my added css file, I had to add !important; to all my links except the original a { text-decoration : none;}).



hmmm...if the result of a modifed link is two classes, it might be because the class added by the filter is following the original class?

it might be I simply have not yet come accross such sites, but I have had much less problems with overridden styles than you it seems...

Also, with respect to links dissapearing after being visited, I cleaned out my
css file and only added the lines you mentioned in your subsequent post. I could not get visited links to dissapear...

do you by any chance have a default css file specified?

or a colorsetting in (tools -> General Tab -> Colors button) that might conflict with the page background colors?

if all else fails, I am curious to see what is causing this, would you mind emailing me your full CSS file if you can't get it solved?

HTH
JarC

 
 

MorpheusDreamlord

  • Jr. Member
  • **
  • Posts: 74
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • Email
Change link style
« Reply #31 on: June 25, 2002, 04:40:16 PM »
Ooh, damn - he's good, he's good. I *never* thought of the font color matching the page background!!! - It's not ALL sites that the link disappears, it's only some sites, and only links opening in a new window.

Thanks mate, I'll go play...

(Btw, that wasn't my entire css file, only the part dealing with gerneral links, the ftp/mail/java links bits were snipped.)

Oh I forgot to add - I was referring to the initial bit of the link css
I've seen both
a.something and a:something
a.something:else and a:something:else
at differing sites (note the initial a. or a: one sites uses one, the other the second, they both seem to work; does it matter?

Re the !important, so what you're saying is that the stuff most of us have added is something that is rarely/never going to be used on a normal site..  ahhh, got you there.. cool, thanks!

|
Come to the Dreaming...

Edited by - MorpheusDreamlord on 25 Jun 2002  17:45:10
|
Come to the Dreaming...