SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2012
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ul li hover issues with IE- when hovering links move up

    Hi All,

    I have an issue with IE with my ul li a hover effect. When I hover over the hyperlinks, they move up a little bit and not sure how to fix it. I changed the hover effect to not include the 'a' tag, but chrome won't display the hover background.

    Here is the code:

    HTML Code:
    .submenu ul {
    	margin: 0px;
    	padding: 0px;
    	list-style-type: none;
    }
    .submenu ul li {
    	height: auto;
    	width: 170px;
    	margin-top: 0px;
    	margin-right: 0px;
    	margin-bottom: 5px;
    	margin-left: 0px;
    	padding-top: 1px;
    	padding-right: 0px;
    	padding-bottom: 2px;
    	padding-left: 0px;
    	border-bottom-width: 1px;
    	border-top-style: none;
    	border-right-style: none;
    	border-bottom-style: solid;
    	border-left-style: none;
    	border-bottom-color: #000;
    	font-family: Arial, Helvetica, sans-serif;
    	text-transform: uppercase;
    	color: #000;
    }
    
    .submenu ul li a {
    	display: block;
    	color: #000;
    	text-decoration: none;
    	margin: 0px;
    	padding: 0px;
    }
    
    
    .submenu ul li a:hover {
    	background-color: #FFC;
    	display: block;
    	width: 170px;
    	margin: 0px;
    	padding: 0px;
    }

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,117
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Only change colors on hover, not the display properties.
    Code css:
    .submenu ul li a {
        display: block;
        width: 170px;
        color: #000;
        text-decoration: none;
        margin: 0px;
        padding: 0px;
    }
    .submenu ul li a:hover {
        background-color: #FFC;
    }

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2012
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks mate.


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
  •