Home > Web Front-end > HTML Tutorial > The solution to the problem that a row will be left blank at the top and bottom of the form when inserted into the form

The solution to the problem that a row will be left blank at the top and bottom of the form when inserted into the form

高洛峰
Release: 2017-02-28 13:18:29
Original
1702 people have browsed it

After inserting a form, there is often a blank line above and below the form, which makes the layout of the web page ugly. You only need to use css to control the margin=0 of the form to solve this problem. I don’t know if you have noticed when making a web page that after inserting a form, there is often a blank line above and below the form. This makes the layout of the web page ugly, so today I will teach you how to solve the problem of blank lines when inserting a form. Methods.

In fact, the empty lines that appear above and below the form form are not really empty lines, but the form form comes with a default margin value, but this value is not equal to 0, so we only need to use css to control the form Margin=0 can solve this problem. The CSS code is as follows:

The code is as follows:

form{margin: 0px;}
Copy after login


More insert form top and bottom Please pay attention to the PHP Chinese website for related articles on the solution that will leave one line empty!


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