1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: css help

Discussion in 'Web Design & Development' started by ms_khw, Jan 26, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. ms_khw

    ms_khw Thread Starter

    Joined:
    Jul 12, 2004
    Messages:
    1,038
    I'm trying to get a grasp on css to control my headings, fonts and links. I generally learn by seeing. I have a basic understanding of setting a css up with fonts and headings but am lost on the links. If someone could give me an example I'd really appreciate it. In what order each one comes and how I add a choice of multiple link styles. When I've created my style sheet (I am using Dreamweaver mx 2004) how do I select from my link styles for the different areas of my web page? I think I understand the order of how the link information goes: .whatever a:link .whatever a:visited .whatever a:hover .whatever a:active but where to place it in my css, well I'm completely lost. thanks, msk
     
  2. DrP

    DrP

    Joined:
    Jul 23, 2005
    Messages:
    739
    Ummm. You need a guide to HTML and CSS, me thinks, but you could try giving links different classes and styling them that way.

    In the HTML:
    Code:
    <a class=style1 href=http://website.com>Link</a>
    <a class=style2 href=http://website.com>Link</a>
    <a class=style3 href=http://website.com>Link</a>
    In the CSS:
    Code:
    a.style1 {}
    a.style2 {}
    a.style3 {}
     
  3. ms_khw

    ms_khw Thread Starter

    Joined:
    Jul 12, 2004
    Messages:
    1,038
    I've been working on my html as well and and have basic understanding of table layout, paragraphs, fonts etc. As well I have been using a css for my pages to control the headings & fonts within my html page. All I want to do now at this point is to have the option of adding multiple link colors. I'm able to create a link to my css no problem. This is what my css looks like at the moment, where do I add the links info?
    h1 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: bold;
    color: #000000;
    line-height: normal;
    }
    h2 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: bold;
    line-height: normal;
    }
    h3 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: bold;
    color: #000000;
    line-height: normal;
    }
    p {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    line-height: 150%;
    font-size: 12px;
    font-weight: normal;
    color: #000000;
    }
     
  4. rotarysteve

    rotarysteve Banned

    Joined:
    Dec 26, 2010
    Messages:
    496
    I'd love a link to ur site, but DrP is dead on correct, but MAY have to define it to each Header Tag....

    .button a:link {text-decoration: none;color: #ffffff;background-color: #004080;}
    .button a:visited {text-decoration: none;color: #ffffff;background-color: inherit;}
    .button a:active {text-decoration: none;color: #ffffff;background-color: inherit;}
    .button a:hover {text-decoration: none;color: #00ff00;background-color: inherit;}


    -OR-

    .col3txt a:link {text-decoration: none;color: #000000;background-color: inherit;}
    .col3txt a:visited {text-decoration: none;color: #000000;background-color: inherit;}
    .col3txt a:active {text-decoration: none;color: #000000;background-color: inherit;}
    .col3txt a:hover {text-decoration: none;color: #00ff00;background-color: inherit;}

    just replace .button or .col3txt with the h1, h2, etc.... and they go with <div class......
     
  5. sepala

    sepala

    Joined:
    May 20, 2010
    Messages:
    4,038
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/977116

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice