Dotted a:hover issue in IE only

Discussion in 'CSS' started by th88, Jan 24, 2008.

  1. #1
    Hello!

    I have an issue with dotted underlines when hovering over a link in IE only, works fine in Safari and Firefox.

    #nav 
    {
    	position: relative;
    	width:700px;
    	height: 50px;
    	border-top: solid 8px #336666;
    }
    
    #nav ul
    {
    	list-style: none;
    	width: 100%;
    	font-family: Georgia, Times New Roman, Times, serif;
    	font-variant: small-caps;
    	font-size: 16px;
    	font-weight:bold;
    	color: #ccc;
    	padding: 10px 0px 10px 0px;
    	margin: 0;
    }
    
    #nav li
    {
    	float: left;
    	margin: 0px 20px 0px 0px;
    }
    
    #nav li a
    {
    	color: #ccc;
    }
    
    #nav li a:hover
    {
    	color: #ccc;
    	border-bottom: 1px dotted;
    }
    
    Code (markup):
    What could be up that means IE doesn't render it properly?
     
    th88, Jan 24, 2008 IP
  2. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #2
    IE doesn't render 1px dotted borders. You can use a higher number or make an image to replicate the dots.
     
    soulscratch, Jan 24, 2008 IP
  3. th88

    th88 Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Cheers for the quick response.



    However, I'm having no luck with that either:

    #nav li a:hover
    {
    	color: #ccc;
    	border-bottom: 3px dotted;
    }
    Code (markup):
    Again, works fine in safari and firefox.
     
    th88, Jan 24, 2008 IP
  4. th88

    th88 Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It appears to be a problem with IE cutting off the very bottom of Divs (1px or so).

    Links not on the bottom line of a Div do appear with a 1px dotted underline. Any links on the bottom line have it but off.

    Really weird problem - setting padding or margins on the bottom doesn't correct it either.

    Any ideas?
     
    th88, Jan 24, 2008 IP
  5. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #5
    I believe you need to specify a color for the border like so:

    border:3px dotted pink;

    I've never omitted the color for the shorthand border property.
     
    soulscratch, Jan 24, 2008 IP
  6. Erind

    Erind Peon

    Messages:
    663
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #6
    like soulscrtatch said, it needs 3 attributes.

    but I would do dashed... that works and looks better since u cant get the 1px.
     
    Erind, Jan 24, 2008 IP
  7. St. Anger

    St. Anger Banned

    Messages:
    211
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    IE render differently from other browsers...
    specially on margins and padding...

    on dotted lines, try to increase the pixel or create an image. :D
     
    St. Anger, Jan 25, 2008 IP