How to make each row of data in each paragraph in a div have two spaces?_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:03:03
Original
1939 people have browsed it

How to make each row of data in each paragraph in a div have two spaces?


Reply to the discussion (solution)

It is best to Your problem is clearly described. Do you mean to indent two words at the beginning of each line? If this is the case, you can use text-indent:24px; in CSS to control it and modify the value of 24 according to your actual content.

What I mean is that each row of data in each paragraph in the div must be two spaces empty. Because the data is read from the database, I am not sure how many rows the data has

You mean there may be multiple rows in a div? If that's the case, you can't do it with CSS alone. It is necessary to control when displaying data after reading it from the database, because how many characters are displayed in one row, that is, how to understand or control one row is up to you. As long as you control one row of data in a div, it will be OK.

What if there is only one line?

After you set it up like this, there will only be spaces at the beginning of each paragraph, and there will be no spaces in other lines. What I mean is that each line in a paragraph must have two blank lines

You You may not understand what I mean. What I mean is to let you control the display after reading the data.
For example, if you set 30 characters to count as one line, then a certain line of data you read may have 100 characters. Then wouldn’t it be enough to break this line of data into 3 lines when you display it? In this way, your final presentation will be displayed in customized rows. Wouldn't it be easy to control each row to have two spaces?

Do you mean to use a character array? Divide 100 characters into multiple strings, right?

Then you may need to process it when fetching the data, and use the

tag to include the content you think is a paragraph, because the text-indent of css seems to only have an effect on the P tag

Related labels:
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