开发者

Pre-formatted HTML containing unwanted line-break

I am trying to create a pre-formatted block of text using the pre element where there are sometimes a few blank lines in between the content. The problem is that occasionally the text breaks onto a separate line after either a forward slash(/) or colon(:)

An example is as follows开发者_如何转开发:

<pre>Lorem ipsum dolor sitat: http://wwww.site.com/foo/bar</pre>

Displays as:

Lorem ipsum dolor sitat: http://wwww.site.com/foo
/bar

Does anyone know how to resolve this?


I'm with @Kyle, without seeing the page itself I think that it is too long for the container that you have it in, so maybe make the text smaller or widen the container and see if that helps.

I tried:

<html>
<pre>Lorem ipsum dolor sitat: http://wwww.site.com/foo/bar</pre>
</html>

and didn't get any line breaks.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜