Home >Web Front-end >HTML Tutorial >Solution to the problem of leaving a blank line above and below the form when inserting it_HTML/Xhtml_Web page production

Solution to the problem of leaving a blank line above and below the form when inserting it_HTML/Xhtml_Web page production

WBOY
WBOYOriginal
2016-05-16 16:36:541896browse

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. method.

In fact, the empty lines that appear above and below the form are not really empty lines, but the 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:

Copy code
The code is as follows:

form{margin: 0px;}
Statement:
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