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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jun 2009
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Remove inherited background color on post titles

    Hi All!
    Trying to help a friend with her blog, and am completely stumped. (I'm a newbie. Obviously.)

    She has a coral colored background color on hover on all her links. She'd like to remove the hover style on the post titles. I've tried just changing the .entry-title a:hover to a new background color (aka, white) but that didn't work. I have Firebug installed, and that has been helpful, but it doesn't seem to show the code for the hover property, I assume because hover isn't active when the page loads.

    Her blog is http://laurenandjessiblog.com/

    Or I can cut and paste the code/stylesheet for you, but since I have no idea where to look, it'd be pretty long.

    Any suggestions?
    Last edited by Prellyree; 01-07-2010 at 03:08 AM.

  • #2
    Regular Coder Kristofa's Avatar
    Join Date
    Jun 2009
    Location
    Leicester
    Posts
    143
    Thanks
    7
    Thanked 20 Times in 20 Posts
    I would try adding:
    Code:
    h2 a:hover {
            background-color: transparent!important;
    }


    That should define what to do when a link is inside a <h2> element, and I think should take precedence over the more generic statement.
    Learning along the way...

  • Users who have thanked Kristofa for this post:

    Prellyree (01-07-2010)

  • #3
    New to the CF scene
    Join Date
    Jun 2009
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Yay! That worked like a charm. I'll have to research that important thing...I've never heard of it.

  • #4
    Regular Coder Kristofa's Avatar
    Join Date
    Jun 2009
    Location
    Leicester
    Posts
    143
    Thanks
    7
    Thanked 20 Times in 20 Posts
    !important makes the CSS property it is applied to take precedence over anything else. In this case, I used it as the existing property for a:hover has '!important', so without applying it to this one as well, the generic a:hover background colour would have overwrote the bit to null the background.

    Sorry, that was a piss-poor explanation. Either way, it's a useful thing to know. :P
    Learning along the way...

  • #5
    New to the CF scene
    Join Date
    Jun 2009
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I totally understand, so it's a good explanation to me.
    Thanks again.


  •  

    Tags for this Thread

    Posting Permissions

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