css question about links

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

hi.. I'm working on a web page that I didn't write but that I'm updating
and maintaining..

it originally had lots of font, b and I tags.. tables based layup.. etc...

I've been gradually getting up to current standard..

I've created a simple css file for it ..  as follows..

a:link {color: #000000}  /*black*/

body    { margin-left: 6em;
      Margin-right: 6em;
ul.nb    {
    list-style: none;
h1    {
    font-weight: bold;
    text-align: center;

h2    {
    font-weight: bold;    

h2.c    {
    font-weight: bold;
    text-align: center;

.inset    { margin-left: 10em;
ul.nb    {
    list-style: none;

#gold a.link {color: #ffd42a}  /*gold*/


this weird line at the end is my attempt to try to figure out what to do
to have just one of my links header 2 size, and to make it a different
colour so that it will stand out...

I'm not sure if I need a pseudo class or a real class and how then to
call it in the html..


<h2><a href="survey.html">Enter to win tickets for the<br /> Krzysztof
Jablonski Piano Concert at the Port Theatre</a></h2>

this is the line in the code that I'm trying to change the colour of..
I tried putting it in a div and asigning the class to the div..

I've tried adding the psuedo class (with the .?) and the class (with the
#?) to the anchor, and to the header tag, but I can't find the exact
combination I need...

I'm sure I must be close...
can anyone help or point me to an appropriate reference..

the whole site is at www.ncmusic.ca


Re: css question about links

Quoted text here. Click to load it

          { color: black }

saves you a comment

Quoted text here. Click to load it

Not sure if CSS is case sensitive, but I would stick to the same case.
Also, you might want to {} like:

body {
        margin-left ...
        margin-right ...

Quoted text here. Click to load it

Don't name things after how they look, but what they semantically mean, if

Quoted text here. Click to load it

h2 a { color: #ffd42a /*gold*/ }  

Meaning: an a element inside a h2 element should have a color of #ffd42a

John    Need help with SEO? Get started with a SEO report of your site:

    --> http://johnbokma.com/websitedesign/seo-expert-help.html

Site Timeline