Forums » Customize

a:active

extrafunk
NETHERLANDS
2008-08-19 11:28:52
 

dear all,

I've been having trouble with the customization of my a:active link. I change the values, but it seems to be overwritten every time a click on one of my links. In other words the a:active values don't appear. I can see the link change once i click on it (clicking on the link and holding it down), but when I release the changes disappear.

You can view my site here

Thanks for the help...

Mark

Doctor_Osimo
GERMANY
2008-08-19 13:39:31
 

Mark, I think this will do what you like to achieve

  1. #menu li.active a { color: #3cccaa; font-style: italic; background-color: blue; text-decoration: none; }

If you want to style the hovers etc of that special link do so:

  1. #menu li.active a:link { }
  2. #menu li.active a:visited { }
  3. #menu li.active a:hover { }
  4. #menu li.active a:active { }

Keep this order for best results!

The a:active is a pseudoclasses to style the clicking on the link and holding it down and not to style the link referenced to the currently displayed area of your site…

cheers

extrafunk
NETHERLANDS
2008-08-19 15:31:28
 

Okay, so i have to make a new style named: #menu li.active a? Because i'm working in the general styles a:link, a:visited, etc.

I also tried adding a new link, which I called b:link. Does change my link, but not to the values i want. Perhaps it's not aloud to call a style: b:link?

What do you think?

Mark

Doctor_Osimo
GERMANY
2008-08-19 16:47:58
 

1st: Yes you do.

2nd: b:link? Nice try! But a is the html-tag for links. b is a html-tag to define text within another tag as bold.
css helps to make the tag look as you wish to with css-attributes. e.g.:

  1. a {color: red;}

To define the behaviour of links when you mouseover (:hover) or click (:active) you can use those pseudoclasses described above. note: they possibly can be used for any tag you like too but this is not supported for all browsers.

extrafunk
NETHERLANDS
2008-08-19 17:06:55
 

Hey Osimo,

alright, i see what you mean! But do i have to delete the values I already entered in the general a:link, a:visited, etc.? In order to make this work?

Mark

Doctor_Osimo
GERMANY
2008-08-19 17:54:50
 

Nope, you needn‘t, Mark! Those define the general look of every link over the complete site. With the notation described above you overwrite the general look of the a-tag only for the a-tag within an li with the class „active“ within the div with the id „menu“…
I think you should test a little around to get used to it. Perhaps selfhtml will help you learning more about html & css. Unfortunately it's only documented in german and french…

cheers
dr. osimo

Showing 1 - 6 of 6 posts in Forum > Customize > a:active
 

You need to be logged in to post.