SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2005
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    problem with class attribute

    I'm running into a problem getting a class atribute to work properly. I have a line of text in a footer where I'm trying to change the font color from the rest of the text and also reduce the point size a bit. It looks like I'm coding it right, however, the class attributes don't seem to appear in my browser. It may be a simple issue of my cache not updating properly, but I checked in both Safari and Firefox (I'm running OSX).

    Here's the URL for the page: http://royalcoffeeandtea.com/index.htm
    and the URl for the CSS file: http://royalcoffeeandtea.com/extras/footer.css

    The area I'm having problem with is the very last line of the footer, and the class attribute is the last item in the stylesheet.

    I would greatly appreciate it if someone can either verify its working in their browser (confirms the cache issue), or if its coded wrong, what I'm overlooking. Thanks.

  2. #2
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Hi,

    Yes, I'm afraid you have coded it wrong. The issue with your CSS is selector specificity. ID selectors hold a lot more weight than class selectors.

    Code:
    #footer p {}
    Cannot be overridden with:

    Code:
    .footerpromolinks {}
    This should work:
    Code:
    #footer .footerpromolinks {}
    As a CLASS holds more weight that an element selector like p.

    I suggest you give this article a read: http://www.stuffandnonsense.co.uk/ar...city_wars.html

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2005
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks. I figured I overlooked something that simple.


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
  •