0

I am facing a similar issue as following post

Empty Div Causing Very Strange Behavior

Answer dint help me much. &nbsp fixes alignment issue, but my html code is generated by spring, so I have to find a way to fix it via CSS. I have uploaded sample code at http://jsfiddle.net/sZ77p/1/

If you add an &nbsp or any text in empty lines under HTML code and run, alignment comes perfectly. Please help.

4

2 回答 2

1

尝试添加overflow: hidden;到您的div {...}

于 2012-04-26T09:55:55.503 回答
0

你试过给你的 div 和明确的高度吗?根据您的示例:

div {
  line-height: normal;
  font: inherit;
  color: inherit;
  height: 16px;
}
于 2012-04-26T10:12:28.367 回答