|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I have a menu with selections:
<a class="nav4w" href="foo.html">buttontext </a> Styled in an external style sheet as: ..nav4w { padding:2px 0 3px 0; display:block; width:98%; border-bottom:1px solid #300099; margin-top:1px; text-align:right; text-decoration:none; font-family: Arial, Helvetica, sans-serif;font-size:100%; font-weight:normal; overflow:hidden; } a.nav4w:link {color:#f8fafc;} a.nav4w:hover {color:#330099;background-color:#f8fafc;} a.nav4w:visited {color:#ffff00;} /*background-color:#3c93db;*/ a.nav4w:active {color:#ffffff;} If I specify a background-color for the visited link, it doesn't change on hover. Is this normal, or what am I doing wrong? TIA, -- Ed Jay (remove 'M' to respond by email) |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Ed Jay wrote:
> a.nav4w:link {color:#f8fafc;} > a.nav4w:hover {color:#330099;background-color:#f8fafc;} > a.nav4w:visited {color:#ffff00;} /*background-color:#3c93db;*/ > a.nav4w:active {color:#ffffff;} > > If I specify a background-color for the visited link, it doesn't > change on hover. Is this normal, or what am I doing wrong? You have the order wrong above. Needs to be: link, visited, (focus,) hover, active -- -bts -"Las Vegas Has Animals" |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Beauregard T. Shagnasty scribed:
>Ed Jay wrote: > >> a.nav4w:link {color:#f8fafc;} >> a.nav4w:hover {color:#330099;background-color:#f8fafc;} >> a.nav4w:visited {color:#ffff00;} /*background-color:#3c93db;*/ >> a.nav4w:active {color:#ffffff;} >> >> If I specify a background-color for the visited link, it doesn't >> change on hover. Is this normal, or what am I doing wrong? > >You have the order wrong above. Needs to be: >link, visited, (focus,) hover, active Thank you... -- Ed Jay (remove 'M' to respond by email) |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
At 11:27:16 on Sat, 29 Mar 2008, Ed Jay <edMbj@aes-intl.com> wrote in
<gf2tu3le195mqu0l9ih375mti3sip5ppfr@4ax.com>: >Beauregard T. Shagnasty scribed: > >>Ed Jay wrote: >> >>> a.nav4w:link {color:#f8fafc;} >>> a.nav4w:hover {color:#330099;background-color:#f8fafc;} >>> a.nav4w:visited {color:#ffff00;} /*background-color:#3c93db;*/ >>> a.nav4w:active {color:#ffffff;} >>You have the order wrong above. Needs to be: >>link, visited, (focus,) hover, active > >Thank you... A useful mnemonic to use in the future is Little Virgins Have Arses. (For a while I tried suggesting Little Virgins Have Arms, but the former proved the more memorable ... for some strange reason...!) -- Molly Mockford They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety - Benjamin Franklin (My Reply-To address *is* valid, though may not remain so for ever.) |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On Mar 30, 11:55 am, Molly Mockford <nospamnob...@mollymockford.me.uk>
wrote: > At 11:27:16 on Sat, 29 Mar 2008, Ed Jay <ed...@aes-intl.com> wrote in > <gf2tu3le195mqu0l9ih375mti3sip5p...@4ax.com>: > > >Beauregard T. Shagnasty scribed: > > >>Ed Jay wrote: > > >>> a.nav4w:link {color:#f8fafc;} > >>> a.nav4w:hover {color:#330099;background-color:#f8fafc;} > >>> a.nav4w:visited {color:#ffff00;} /*background-color:#3c93db;*/ > >>> a.nav4w:active {color:#ffffff;} > >>You have the order wrong above. Needs to be: > >>link, visited, (focus,) hover, active > > >Thank you... > > A useful mnemonic to use in the future is Little Virgins Have Arses. > (For a while I tried suggesting Little Virgins Have Arms, but the former > proved the more memorable ... for some strange reason...!) A better solution yet would be to explain the actual CSS rules priority for links so to use either preferred way out of many to keep the right priority. Otherwise all these "right orders" and "little virgins" brings way too much of voodooism into styling. Just like someone would making "Be Red" and "Rise Blue" slogans to memorize the div order below for a particular color instead of understanding the CSS rule override mechanics :-) div { color: blue; } div { color: red; } The topic in question was once explained in details at http://groups.google.com/group/comp....063946e8b87860 |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
Beauregard T. Shagnasty vertrouwde ons toe:
> Ed Jay wrote: > >> a.nav4w:link {color:#f8fafc;} >> a.nav4w:hover {color:#330099;background-color:#f8fafc;} >> a.nav4w:visited {color:#ffff00;} /*background-color:#3c93db;*/ >> a.nav4w:active {color:#ffffff;} >> >> If I specify a background-color for the visited link, it doesn't >> change on hover. Is this normal, or what am I doing wrong? > > You have the order wrong above. Needs to be: > link, visited, (focus,) hover, active > Not according to Eric Meyer http://meyerweb.com/eric/thoughts/20...e-link-states/ -- Rob |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
VK wrote:
> > A better solution yet would be to explain ............ <http://meyerweb.com/eric/css/link-specificity.html> -- Gus |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
Rob Waaijenberg wrote:
> Beauregard T. Shagnasty vertrouwde ons toe: >> Ed Jay wrote: >> >>> a.nav4w:link {color:#f8fafc;} >>> a.nav4w:hover {color:#330099;background-color:#f8fafc;} >>> a.nav4w:visited {color:#ffff00;} /*background-color:#3c93db;*/ >>> a.nav4w:active {color:#ffffff;} >>> >>> If I specify a background-color for the visited link, it doesn't >>> change on hover. Is this normal, or what am I doing wrong? >> >> You have the order wrong above. Needs to be: >> link, visited, (focus,) hover, active > > Not according to Eric Meyer > > http://meyerweb.com/eric/thoughts/20...e-link-states/ Note that the content and comments on this linked page are at odds. Looks like about half of the respondents favor :focus after :hover, and the other half prefer it before. http://meyerweb.com/eric/thoughts/20...e-link-states/ "¡§:link, :visited, :focus, :hover, :active¡¨ should be the most useful way [¡K]." "I remember reading something a few years ago that used this piece of wisdom to remember the order: [L]uther [V]andross [F]ans [H]ate [A]bba. Brilliant." "I¡¦m with Jens. My favourite rule is ¡§Lord Vader¡¦s Former Handle Anakin¡¨." For :focus, it probably doesn't matter very much, as long as link, visited, hover, active are in this order. -- -bts -Friends don't let friends drive Vista |
|
![]() |
| Outils de la discussion | |
|
|