views:

163

answers:

2

I have a problem with border in IE7. For some reason the border shows only from the left and the right side:

IE7, renders incorectly:

alt text

FF, renders correctly:

alt text

Using this CSS:

.tags a {
  background:#fff;
  border:1px solid #D8DFEA;
  padding:5px;
  margin-left:5px;
  color:#3B5998;
  font-size:14px;
}

What am I doing wrong?

+2  A: 

Most likely the borders are clipped by the height of the .tags container. The css for .tags a itself looks OK.

Note that since <a> is an inline element you can't set it's height (unless you set it to display:block). The height difference is most likely caused by the fonts being rendered differently by different browsers. Also watch out for Safari which tends to render fonts fatter (taking up more pixels) than all other browsers.

slebetman
what should I do in that case ?
Gandalf StormCrow
Show us the css rule of `.tags` or any other parent container where height is set. The css you're showing us does not cause the bug.
slebetman
Excellent champ, when I set it to display block they went in seperate lines, I added float left , now it works tnx
Gandalf StormCrow
A: 

I just had the same problem in IE. I think this was cause by me setting the font-size within this div.

I set the line-height to match my font-size, and this works in IE, FF, Chrome, Opera, Safari - yeah!

helena