开发者

css clear in safari and chrome creates an extra line, not in firefox

Adding clear: left, clear: right, or clear:both to an element would create an extra carriage return in Firefox, but not in Chrome and Safari, it is very frustra开发者_如何学Goting, anyone know how to fix this?


.clear-nobr {clear:both;line-height:0!important;font-size:0!important;}


If you are adding the style to the line break tag (<br>) then this will add a line break as should be expected. You could try using a div instead since they have zero height when there is no content:

<div style="clear:both"></div>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜