开发者

pre gives me empty lines before and after

I had a box with 3 divs which were all a line each. I gave them each a background color. I wanted to give one of the <pre> so it would hold spaces and newlines like a user may wish. However now that i do that i see an empty line before and after the pre. I have a border solid black 1px in the parent div so i can easily see the background color of the div before it and the border of the parent div.

How do i remove the empty line before and aft开发者_开发问答er the pre?


This table shows that most browsers add default margins around PRE. You need to remove them if you don't want extra space.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜