How to ensure that the size of a table or DIV in JSP or HTML is not changed by inserting a form?

Source: Internet
Author: User

How to ensure that the table or Div does not change the size because the form is inserted?

I. Problem description: in JSP/html, after a form is inserted into a table or Div, the table or Div increases, affecting the original layout.

Ii. Method of Liberation:

In this case, setting the table <TD> or Div's height and width does not work. The following method can solve this problem:

Method 1: Set overflow: hidden in TD, so that the excess part is not displayed.

<TD Height = "25px"Style = "overflow: hidden">

Or <Div Style= "Overflow: hidden; 100px; Height: 25px; float: Left; ">

Add overflow: hidden; to the DIV style so that the DIV will not become larger even if the content in the DIV is too large.

Method 2: directly set the padding and margin attributes for the form, or directly set the attributes in CSS or

CSS: FORM {Padding: 0px; margin: 0px;}

Set directly;

<HTML: Form Action = "/admindeletenews. Do" method = "Post"Style = "padding: 0px; margin: 0px ;">

3. Practice has proved that this has been achieved.

Keywords: add the form in the table to become larger; Add the form in the DIV to become larger; form; table; TD; div; height; width; height does not work; how to increase the cell height after adding form

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.