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