开发者

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

开发者 https://www.devze.com 2023-01-06 16:44 出处:网络
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

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

精彩评论

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