![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
here's the code (or visit http://tomasio.laudatio.com/jobs/Cla...stylesheet.css) div.Footer a { color: #f9bddb; text-decoration: none; } a:link {color: #9C1350; text-decoration: none;} a:visited {color: #9C1350; text-decoration: none;} a:hover {text-decoration: underline; background-color: #E181AD; } a:active {color: Maroon; text-decoration: none;} |
#3
| |||
| |||
|
|
As I want the color of a:link inside the footer of my page (http://tomasio.laudatio.com/jobs/Cla...d_beauty.html), I selected it as descendant element of the div: here's the code (or visit http://tomasio.laudatio.com/jobs/Cla...stylesheet.css) div.Footer a { color: #f9bddb; text-decoration: none; } a:link {color: #9C1350; text-decoration: none;} a:visited {color: #9C1350; text-decoration: none;} a:hover {text-decoration: underline; background-color: #E181AD; } a:active {color: Maroon; text-decoration: none;} |
|
In Mozilla the color of the link inside div.Footer changes as expected, but IE seems to ignore this. Is there a way how to achieve the color change in IE also? |
#4
| |||
| |||
|
|
Not sure what you want to do, but something like this might be a solution: a:link, a:visited, a:hover, a:active { ... } a:hover { ... } a.Footer:hover, a.Footer:link, a.Footer:visited, a.Footer:active { ... } Note that CSS is case-sensitive so it must be <div class="Footer">...</div> in your HTML as well. |

#5
| |||
| |||
|
|
"Philipp Lenssen" <info (AT) outer-court (DOT) com> schrieb: Not sure what you want to do, but something like this might be a solution: a:link, a:visited, a:hover, a:active { ... } a:hover { ... } a.Footer:hover, a.Footer:link, a.Footer:visited, a.Footer:active { ... } Note that CSS is case-sensitive so it must be <div class="Footer">...</div> in your HTML as well. Hi philipp, thank you for your quick response. what i want is to give the hyperlinks in div.Footer another color than the links in the rest of the document. regarding to the book of eric meyer (CSS - Definitive Guide) your approach is correct, but it does not work: neither in mozilla nor in IE. maybe it has to do something with the cascade, or that div.Footer is nested in another div? Most be some stupid issue ![]() |
#6
| |||
| |||
|
|
thank you for your quick response. what i want is to give the hyperlinks in div.Footer another color than the links in the rest of the document. regarding to the book of eric meyer (CSS - Definitive Guide) your approach is correct, but it does not work: neither in mozilla nor in IE. maybe it has to do something with the cascade, or that div.Footer is nested in another div? |
#7
| |||
| |||
|
|
Always set color and background-color together to avoid clashes with user stylesheets. |
|
In Mozilla the color of the link inside div.Footer changes as expected, but IE seems to ignore this. Is there a way how to achieve the color change in IE also? Same colour in IE6, Opera 7 and Mozilla 1.6. Which version of IE on which OS is giving you a problem? I am using IE 6 under WinXP Prof. SP1. Are you sure that we are |

#8
| |||
| |||
|
#9
| |||
| |||
|
|
If you put the generic link styles after the classed or id'ed or div'ed ones, they'll supercede. Be sure you have a:link {} a:visited {} a:active {} a:hover {} and after it in the styles div.class a:link {} div.class a:visited {} div.class a:active {} div.class a:hover {} The first style group changes all links to be something, the second changes only links in <div class="class"> to be different. |
|
div.class a:link {} div.class a:visited {} div.class a:active {} div.class a:hover {} a:link {} a:visited {} a:active {} a:hover {} |
#10
| |||
| |||
|
|
Neal <neal413 (AT) yahoo (DOT) com> wrote: If you put the generic link styles after the classed or id'ed or div'ed ones, they'll supercede. Be sure you have a:link {} a:visited {} a:active {} a:hover {} and after it in the styles div.class a:link {} div.class a:visited {} div.class a:active {} div.class a:hover {} The first style group changes all links to be something, the second changes only links in <div class="class"> to be different. Are you saying that if you have the rulesets in this order: div.class a:link {} div.class a:visited {} div.class a:active {} div.class a:hover {} a:link {} a:visited {} a:active {} a:hover {} - they will not have exactly the same effect? |
![]() |
| Thread Tools | |
| Display Modes | |
| |