SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2006
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Footer links CSS to overwrite default

    Guys,
    This might be a really daft question, but I can't get it to work:

    fab!and:you

    See the contact . sitemap . (c) fabian bauer - 2010 on the bottom? How can I make those links white using css?

    So far I have put them into a
    Code:
    <div class="footer">links here</div>
    statement and added a line in my stylesheet which reads:

    Code:
    a:link, a:visited {
    	text-decoration: none;
    	color: #555555;
    }
    a:active {
    	text-decoration: none;
    	color: #FFFFFF;
    }
    a:hover {
    	text-decoration: underline;
    	color: #888888;
    }
    .footer {
    	text-align: right;
    	font-size: 12px;
    }
    a.footer:link, a.footer:visited {
    	color: #FFFFFF;
    }
    So if I understand it correctly, the last two statements should supersede the default a statements above it. Am I correct? It doesn't seem to be working!

    Any help would be greatly appreciated.

    Fabian

  2. #2
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,095
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    It should be

    Code css:
    .footer a, .footer a:link, .footer a:visited, .footer a:active, .footer a:hover {
    	color: #FFFFFF;
    }

    Since it is the links reside in a div with class "footer", and the links themselves don't have the class footer (as your CSS code suggested).

    I added ".footer a" and the :active and :hover pseudo-classes for completeness sake.
    Without ".footer a" some older versions of IE sometimes display the links incorrectly.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2006
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    duuuh of course!

    Thanks for the quick help!


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
  •