Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: Links color

  1. #1
    Regular Coder
    Join Date
    Jun 2007
    Posts
    805
    Thanks
    123
    Thanked 23 Times in 23 Posts

    Links color

    Hey!

    In my CSS I have specified that all my links should be white. However I have one single link, which I don't want to be white but black. You can see it here, the one @ the footer: http://www.xflightx.port10.com/test/main-layout.php

    How would I come around that?

  • #2
    Regular Coder Jutlander's Avatar
    Join Date
    Jun 2007
    Location
    In my own sick little world :P
    Posts
    425
    Thanks
    1
    Thanked 12 Times in 12 Posts
    You assign an ID to it.

    Code:
    <a id="footerlink" href="copyright.php">© 2007 - XflightX | All Rights Reserved</a>
    And then make the ID in your CSS:

    Code:
    a#footerlink {
    color: #000;
    background: inherit;
    }
    .
    .

  • #3
    Regular Coder
    Join Date
    Jun 2007
    Posts
    805
    Thanks
    123
    Thanked 23 Times in 23 Posts
    Thanks bud

    But what does the background:inherit; btw do?

  • #4
    Regular Coder Jutlander's Avatar
    Join Date
    Jun 2007
    Location
    In my own sick little world :P
    Posts
    425
    Thanks
    1
    Thanked 12 Times in 12 Posts
    It does so the link inherits the background color of it's parent, in this case the footer.
    .
    .

  • #5
    Regular Coder
    Join Date
    Jun 2007
    Posts
    805
    Thanks
    123
    Thanked 23 Times in 23 Posts
    Ahh! That's smart lol. Thanks again

  • #6
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Yeah, the inherit keyword is smart, but unfortunately it isn't supported in IE6 which is why we still cannot rely on that it works.


  •  

    Posting Permissions

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