In html, we can use <a href="#Link's_Title"> and <a name="Item_to_jump_to_on_the_same_page"> to link to another item on the same page. Can we not use this method in html pages when using css, or is there another method? My item to jump to is showing up as a link (even though it's not linked to anything), but it doesn't do this in a regular html page with no css involved. Sorry--I'm a genuine beginner.
It functions the same whether or not you are using CSS. Because you've given it a style in CSS (a:link, a:visited, a:active, a:hover) .. it will take those CSS properties. Give it its own class and style it separately than a normal link and you're good to go.
Thank you so much for the reply. I've been all over some CSS tutorials and I'm still not sure how to give something it's own class and style it separately. I'm completely new to this; I just know some html. If I'm asking for more than I should on this forum, please let me know; I'm just wondering if you could give me a bit more help with this. Thanks so much. Kathy
a:link is a subset of a. It, a:link, applies when there is an href attribute. By default, in most browsers, the colors are a, a:link, a:visited, a:hover, and a:active. To make a target anchor the same color as your text, set a {color: inherit;}. IE does not support inherit, so you'll need to be specific, e.g. a {color: black;}. This adds to the maintenance cost, but that's IE for you. Having set a, you will need to reset the pseudo classes: a:link {color: blue;} a:visited {color: magenta;} a:hover {color: blue;} a:active { color: red;} Be sure your selectors are in that order, to maintain precedence. cheers, gary
Thanks, and sorry to be so dumb, but where, exactly, do I put {color: black;}? In style.css or the html file? "a" is set up like the following. Can I just leave it like this? a { color: #BE8571; font-weight: bold; text-decoration: none; } a:hover { color: #000000; text-decoration: underline; }
Is that the color, font-weight and text-decoration you want for the target anchors? If not, what do you want? Or, is that the color, etc. you want for links? cheers, gary
That is the color, etc., that I want for the links. For the target anchors, I want them to not act as a link, and I want them in black.
Then use this in place of what you have in the css file. a { color: black; text-decoration: none; } a:link { color: #BE8571; font-weight: bold; } a:visited { color: [some other color]; } a:hover { color: black; text-decoration: underline; } Code (markup): Go to htmldog.com, and work through their tutorials. You will expand your knowledge enough to feel more confidence in what you're doing. cheers, gary