Making an image hover behind text

Discussion in 'CSS' started by Destinyx3, Jan 1, 2009.

  1. #1
    For some reason, I can not get an image that will be the link hover to display properly behind the navigation text. It ends up being cut off by the font size it seems and not showing the full height and width even if I set it to that.

    Here you'll see the problem I'm having: http://serenedestiny.com/clientwork/j4k/index.html

    Thank you,
    Nicole
     
    Destinyx3, Jan 1, 2009 IP
  2. markupdude

    markupdude Peon

    Messages:
    215
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Oh no no, instead of adding height to the :hover u add height to the link.

    Please replace the following places [with a backup] and we shall see:

    #nav a {
    	color: #fff;
    	text-decoration: none;
    	font-size: 17px;
    	text-align: left;
    	height: 28px;
            line-height:27px;
            float:left;
            padding:0 20px;
    }
    
    #nav a:hover {
    	background: url(i/nav_hov.png) center top no-repeat;	
    }
    Code (markup):
     
    markupdude, Jan 1, 2009 IP
  3. Destinyx3

    Destinyx3 Peon

    Messages:
    430
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That worked, thank you :)
     
    Destinyx3, Jan 1, 2009 IP