SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast patawa's Avatar
    Join Date
    Jul 2004
    Location
    Missouri
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using Styles in context

    I have a problem in IE. Does anyone know what I should do. In my style sheet I have:

    h3 a:link {color:blue;}

    and in my html I have and it works:

    <div id="body
    <h3><a href="http://movies.yahoo.com/shop?d=hv&cf=info&id=1808475830">Click here for a great Alien vs. Predator article.</a></h3>

    My problem is that in my style sheet I have

    p a:link {color:red;}

    and my html this style does not work:



    <p class="firstline">The Bourne Supremacy re-enters the shadowy world of expert assassin Jason
    Bourne <a href="http://movies.yahoo.com/shop?d=hc&id=1800020155&cf=gen&intl=us">Matt Damon</a></p>

    </div>

    Does this have something to do with IE or am I doing something wrong.What should I do to make this work. Thanks I need someone with more knowledge that myself

  2. #2
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This worked for me:

    Code:
    <html>
    <head>
    <style type="text/css">
    p a:link {color:red;}
    </style>
    </head>
    
    <body>
    <p class="firstline">The Bourne Supremacy re-enters the shadowy world of expert assassin Jason 
    Bourne <a href="http://movies.yahoo.com/shop?d=hc&id=1800020155&cf=gen&intl=us">Matt Damon</a></p>
    </body>
    </html>
    Ryan Butler

    Midwest Web Design

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,484
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    The above code works for me also. We would need to see more code in case you are over-riding the styles with something higher up the code.

    Paul


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •