3 replies [Last post]
k_anafor
Offline
newbie
Last seen: 13 years 37 weeks ago
Joined: 2006-12-31
Posts: 4
Points: 0

http://img401.imageshack.us/my.php?image=untitledoy2.jpg

IE is behaving very strange and creating extra space between of my links. I have faced with that problem before but I fixed it by leave a white space before closing my link.

But since I am implementing a design to wordpress and getting links from database I am no more able to leave a white space. How can fix that problem

Between css
ul, li { list-style:none; margin:0; padding:0;}

.sidebar a, .sidebar a:visited {
color: #ccc;
text-decoration:none;
border-bottom: 1px dotted #4f4f4f;
display: block;
font-size: .7em;
padding: 2px;
}
.sidebar a:hover {
background: #255a90;
color: #fff;
text-decoration: none;
}

between body

vinhboy
vinhboy's picture
Offline
Enthusiast
davis, ca
Last seen: 12 years 5 days ago
davis, ca
Joined: 2006-12-21
Posts: 257
Points: 0

There is not enough

There is not enough information here for me to help you. Sorry. Everything you posted looks fine though.

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 5 years 49 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

When applying display: block

When applying display: block to list item anchors, you need to give them a height to overcome the extra space in IE. You can either use a height in your main stylesheet (using ems would be best to allow for text size increases) or you can use a hack or conditional comments to just give the height to IE.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

k_anafor
Offline
newbie
Last seen: 13 years 37 weeks ago
Joined: 2006-12-31
Posts: 4
Points: 0

just one line added as

just one line added as line-height:1em; and the problem is fixed
thank you Tyssen