What settings are needed to display a large section of text in a Div? _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:14:19
Original
1090 people have browsed it

In a small application, I need to display a large text on the page. The text may be very long, up to about 50,000 words.

First of all, the original text format needs to be maintained, such as spaces, blank lines, carriage returns, TAB, etc.
Secondly, if a piece of text is long, it needs to be automatically wrapped, and the DIV or even the outer container cannot be opened.
Third, if there are special characters in the text, such as quotation marks, HTML codes, etc., they must be displayed normally.

Currently I am trying PRE tags 1 and 3 in DIV, which works, but the second point cannot.
What other settings do I need to add?


Reply to the discussion (solution)

It’s your style problem~ After using floats, just remember to float them clearly at the end~

#body_content DIV.down{	background-image: url("../images/content_down.png");	background-repeat: no-repeat;	width:986px;	height:98px;	margin:0;	float:left;}#body_content DIV.down{	background-image: url("../images/content_down.png");	background-repeat: no-repeat;	width:986px;	height:98px;	margin:0;	float:left;}#body_content DIV.center{	background-image: url("../images/content_center.png");	background-repeat: repeat-y;	width:986px;	margin:0;	float:left;}#body_content DIV.up{	background-image: url("../images/content_up.png");	background-repeat: no-repeat;	width: 986px;	height: 105px;	margin: 0;	padding: 0;	float:left;}#area_footer{	width:100%;	height:80px;	padding:50 0 0 0;	clear:both;}
Copy after login

Sorry for the wrong reply~

Your problem, solution:
Set the width of the outer div, write the text with a p tag, and use a p tag for each paragraph;

That’s it~

Sorry for the wrong reply~

Your problem, solution :
Set the width of the outer div, use p tags to write the text, and use one p tag for each paragraph;

That’s it~

It doesn’t work.

It can be displayed with a textarea with a hidden border and a transparent background. The code is as follows:


Use $("XXX").value="..."; Just set the value.

It is possible to use textarea.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!