1.>
In Div, if the height is set to be smaller than 20px and the content is blank, the height setting in IE6 does not work, and IE sets a default height of 20px, the solution is to set font-size: 1px, which is to set the default font size to the minimum.
This problem does not exist in IE8 and Firefox.
2.>
Text, images, and form elements (text, button, single choice, multiple choice, etc.) are vertically centered in the middle, Code
1 < Label Style = "Display: inline-block; Vertical-align: middle ;" > Little bit by bit </ Label > < Select Name = "F" Style = "Vertical-align: middle; display: inline-block ;" > < Option > Text alignment </ Option > </ Select >
2 < Input Name = "" Type = "Button" Value = "Vertical center" Style = "Vertical-align: middle ;" /> < IMG SRC = "../Images/icon_rss.gif" Style = "Vertical-align: middle ;" />
3
Text
Text alignment
Remember to add vertical-align: middle to form elements. Use lable to add text. Set the image to a text stream, that is, display: inlin; Vertical-align: middle: in IE6, if there is no text in front of the form and an empty label is added, the elements in the DIV are vertically centered. In this example, a label must exist.