CSS inheritance problem

Discussion in 'CSS' started by longroad, May 31, 2008.

  1. #1
    My stylesheet declares a global link color near the top, ie:

    a {
    	color: #336600;
    }
    Code (markup):
    But I want to declare a different link color for my content div, so I've placed this further down:

    #content a {
    	color:#0000ff;
    }
    Code (markup):
    But the link colors still all stay at #336600

    Why isn't the declaration further down the style sheet overwriting the other link style for this div?
     
    longroad, May 31, 2008 IP
  2. AFitch

    AFitch Peon

    Messages:
    45
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It's not a problem in the CSS, although it could be related. Show the HTML and the CSS so I can help you.
     
    AFitch, May 31, 2008 IP
  3. rochow

    rochow Notable Member

    Messages:
    3,991
    Likes Received:
    245
    Best Answers:
    0
    Trophy Points:
    240
    #3
    As AFitch said, you'll have to paste the HTML and CSS.

    Could be a lot of things.
     
    rochow, May 31, 2008 IP
  4. longroad

    longroad Well-Known Member

    Messages:
    1,645
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    155
    #4
    Found it, just messed around with CSS and it worked. Thanks :)
     
    longroad, May 31, 2008 IP