In CSS, you can use the line-height attribute to set the br height. You only need to set "br{display:inline;line-height:height value}" to br. The line-height attribute sets the height of the br tag. The larger its value, the higher the height of the br tag.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
In the process of building a website, a lot of text input may not be implemented using static templates, but using a more advanced CMS to build the website. In the process of building a website using CMS, it is inevitable that the background RTE will be used to input text. Content, for people who know HTML code, this is of course a piece of cake. They can enter HTML code directly, but for people who cannot code, they can only enter text directly, which will inevitably produce a lot of br tags.
This tag is of course extremely convenient for users, but developers need to consider the compatibility of the front-end display. Under FF and IE, the height of br displayed is completely different.
Finally I found that I only need to use CSS definition:
br{ display:inline; line-height:11px; }
Recommended learning: css video tutorial
The above is the detailed content of How to set br height with css. For more information, please follow other related articles on the PHP Chinese website!