关于如何让文章自动换行的问题,请教高手!
我做了一个网页,我想让发表的文章还是原来的格式,所以用了 <pre> ,但是显示的页面有一个很长的左右下拉条,直到文章的一段文字结束,它才换行,我想让它到右边自动换行,请问怎么办?article.getContent()%是文章正文
这是一些代码:
<%if(articleList != null ){
System.out.println(articleList.size());
for(int i = 0;i < articleList.size();i++)
{
article = (Article)articleList.get(i);
%>
<tr>
<td width= "420 ">
<b> <font color= "#FF0000 "> <%=article.getTitle()%> </font> </b>
<p>
<b> <font color= "#FF0000 "> <pre> <%=article.getContent()%> </pre> </font> </b>
</p>
<p align= "right ">
<b> <font color= "#FF0000 "> <a href= "showFeedback?articleid= <%=article.getId()%> "> 应用此文 </a> </font> </b>
</p>
</td>
</tr>
<%
}
} %>
------解决方案-------------------- <%if(articleList != null ){
System.out.println(articleList.size());
for(int i = 0;i < articleList.size();i++)
{
article = (Article)articleList.get(i);
%>
<tr>
<td width= "420 ">
<b> <font color= "#FF0000 "> <%=article.getTitle()%> </font> </b>
<p>
<b> <font color= "#FF0000 "> <pre> <%=article.getContent()%> </pre> </font> </b>
</p>
<p align= "right ">
<b> <font color= "#FF0000 "> <a href= "showFeedback?articleid= <%=article.getId()%> "> 应用此文 </a> </font> </b>
</p>
</td>
</tr>
<%
}
}%>