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: Two css

Discussion in 'Web Design & Development' started by dannyn, Sep 28, 2008.

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

    dannyn Thread Starter

    Joined:
    Nov 8, 2007
    Messages:
    1,689
    Can you use two differnt linked style sheets.
    The reason for me wanting to do this:
    -I want some link colors to behave differently from others.
     
  2. lumentec

    lumentec

    Joined:
    Mar 23, 2008
    Messages:
    103
    Yes. As many as you want.
     
  3. dannyn

    dannyn Thread Starter

    Joined:
    Nov 8, 2007
    Messages:
    1,689
    Yeah, I know that but here is my problem..
    First I want to link to the, in the head tag.
    I would just use differnt selectors and were set..
    but the trouble is..
    a:link is always is the same selector so how do I work that?
     
  4. lumentec

    lumentec

    Joined:
    Mar 23, 2008
    Messages:
    103
    I'm not completely sure what your asking.
    Are you saying you want a linked style sheet and an in-HTML style sheet?

    In a case of linked vs. in-HTML style sheets, the in-HTML style sheet always wins. So if you have conflicting statements in the two different style sheets, the in-HTML style sheet will always rule.

    But... I don't see why you don't just link it all or keep it all in-HTML. Just add some classes to the styles for different links.
     
  5. dannyn

    dannyn Thread Starter

    Joined:
    Nov 8, 2007
    Messages:
    1,689
    One linked css
    Here is what I want.
    I want one link, before click, to be white.
    I want another link, before click, to be blue.
    You have the a:link....
    oooo wait... this is where you could use a class vs. id.
    What would be the css code for this?
     
  6. lumentec

    lumentec

    Joined:
    Mar 23, 2008
    Messages:
    103
    In the <head> section...

    Code:
    <style type="text/css">
    a.white {
    color: white;
    }
    
    a.blue {
    color: blue;
    }
    
    </style>
    

    And in the <body> section...

    HTML:
    <a href="http://www.mywebsite.com" class="white">This link in white.</a>
    <a href="http://www.myotherwebsite.com" class="blue">This link is blue.</a>

    Did you also want the links to turn different colors when you put your mouse on them?
     
  7. dannyn

    dannyn Thread Starter

    Joined:
    Nov 8, 2007
    Messages:
    1,689
    Thanks!
     
  8. 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!

Thread Status:
Not open for further replies.

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

  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