If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Different formats for <a> tag

Hi
I am using dreamweaver 2004 for designing websites. I have formated the <a> tag within CSS. My problem is that I would like to have different font colours and background colours of the <a> tag over the website. I don't know how to do. Can anybody please help? Thank you.

You can use CSS class or id identifiers to change colors. An id would be used if that particular <a> tag is unique (i.e. you will not be using that color scheme elsewhere on the site). Class identifiers are used for repeating elements.

You should see the relationship between the various CSS declerations and the anchors we used.

a is the default setting for all anchors. Unless these specific settings are redecleared in class/id style tags, they will still apply.
a#good refers to id="good".
a.goodnews refers to class="goodnews".

Ehh, semantics. In all practicality, what I suggested is correct. If someone is just learning CSS, the likelihood, that they're using multiple stylesheets across a site. To be technical though, yes you're right.

In most instances, however, if you're repeating a particular style across several pages, and using one stylesheet, standards say to use class identifiers. Of course, there are exceptions where specificity demands, but let's not try to confuse people who are just starting out with CSS.

boogyman, don't argue for no reason. Reread what I stated before. You're getting into a semantic argument. We both mean the same thing. I think the OP understands. If they don't they can ask for a clarification.