I've been banging my head over this for a few days, and I thought I'd ask the wizards in here. I currently have a site style where chunks of text are often headed by a dark background bar with white text. The body of the page is mostly black text on a white or light grey background. This works fine until I want a link in the text on the bar. Then it ignores the white text color and uses the regular blue/purple, which looks horrible and illegible. I know how to set the link style color for the whole page, but so far I haven't found a way of setting it just for one part of the page. Here's what I do at the moment (with excess junk removed): site.css:
Any suggestions what I can do in the style file to ensure that links in the dark header bars appear white like the regular text? Many thanks.
Thanks Eric. That was interesting, but not quite what I wanted. In the end I found another tutorial which pointed out that you can limit style changes to an arbitrary hierarchy of elements using " " (space) as a separator. So I added
to my style file, and now all links (visited and unvisited) in an area of class "divider" appear as white. I knew there had to be a way.
subject: changing link color for just one part of a page