Forum Moderators: open
I specified the link color for all content, yet always when creating a new link it is displayed in the browser default color and I have to specify the color again.
In the style sheet I declare:
#maincontentGeneral a:link {color: #cc0000;}
#maincontentGeneral a:hover {color: #cc0000;}
#maincontentGeneral a:active {color: #cc0000;}
#maincontentGeneral a:visited {color: #cc0000;}
#maincontentGeneral wraps all content
Thank you,
Katrin
#maincontentGeneral a:link {color: #cc0000;}
#maincontentGeneral a:visited {color: #cc0000;}
#maincontentGeneral a:hover {color: #cc0000;}
#maincontentGeneral a:active {color: #cc0000;} Also, you have the same color for all 4 link states?
CSS is case sensitive. If your ID/Class is not using Camel Caps as you have above #maincontentGeneral, it won't work. You may be better off converting everything to lower case so you don't run into those problems in the future.
I removed #maincontentGeneral as well as I want All links on the site with that color.
The color is displayed only after the link got clicked and then going back to that site, yet, I most likely have to clean the style sheet as I specified so many links:-/ (the joys of learning a new language)
Katrin
The joys of learning a new language.
We'll look forward to reading you.
We have a great group of people who hang out at the CSS Forum and are more than happy to provide assistance when they can.
WebmasterWorld CSS Forums
[webmasterworld.com...]
I went through my style sheet and removed any 'redundant' link color styles. I quoted 'redundant' as I believe when I define simply
a:link {color: #cc0000;}
a:visited {color: #cc0000;}
a:hover {color: #cc0000;}
a:active {color: #cc0000;}
ALL links will be displayed ALL the time in that color. Yet, they are not - they are displayed in browser default color (blue), only when I hover over them or click the link and then go back to the initial page they are displayed in my desired color. What did I miss? Are there any cascade and specificity issues when using lists for various navigation bars (I haven't understood this part of css thoroughly yet).
So, if I i.e. define
#topnav a {
display: block;
padding-top:24px;
text-decoration:none;
background: url(../images/design/topnavbg.gif) no-repeat left bottom;
}
the 'a' tag is defined more specifically with no defined color it displays the browser default ones (especially because my color style sheet is imported into the one that defines '#topnav a') -
actually - I just verified that - and this was the problem!
Conclusion: organizing style sheets need more care than just sorting them by color, typography, layout... and importing them into a basic style sheet.
Thanks to that forum and its inspirations:-)
Katrin