Written at the beginning
Code :
<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
< Html Xmlns = "Http://www.w3.org/1999/xhtml" >
< Head >
< Meta HTTP-equiv = "Content-Type" Content = "Text/html; charsets = UTF-8" />
< Title > Untitled document </ Title >
< Style Type = "Text/CSS" >
. Pagediv {
Width : 100% ;
Height : 22px ;
Border : 1px solid # cad9ea ;
Line-height : 150% ;
Background-color : # F7f7f7 ;
}
. Pagediv ul {
Margin : 0 ;
Padding : 0 ;
List-style-type : None ;
Text-align : Center ;
}
. Pagediv ul Li {
Border : 1px solid #00ff00 ; /* A border is added to facilitate debugging. */
Display : Inline ;
}
</ Style >
</ Head >
< Body >
< Div Class = "Pagediv" >
< Ul >
< Li > < A Href = "#" > Item 1 </ A > </ Li >
< Li > < A Href = "#" > Item 2 </ A > </ Li >
< Li > < A Href = "#" > Item 3 </ A > </ Li >
< Li > < A Href = "#" > Item 4 </ A > </ Li >
</ Ul >
</ Div >
</ Body >
</ Html >
After running, both in IE and FF show that there is a space on the right side, but the above Code has no errors based on personal experience. After debugging for two hours, I still do not know the reason, I checked Google and found out where the results were? < Ul >
< Li > < A Href = "#" > Item 1 </ A > </ Li >
< Li > < A Href = "#" > Item 2 </ A > </ Li >
< Li > < A Href = "#" > Item 3 </ A > </ Li >
< Li > < A Href = "#" > Item 4 </ A > </ Li >
</ Ul >
Change the above Code: < Ul >
< Li > < A Href = "#" > Item 1 </ A > </ Li > < Li > < A Href = "#" > Item 2 </ A > </ Li > < Li > < A Href = "#" > Item 3 </ A > </ Li > < Li > < A Href = "#" > Item 4 </ A > </ Li >
</ Ul >
That is, if you do not press enter to wrap the line, write it as a line. The problem is solved!
After the solution was completed, I was so angry that I could not find a single place. What is the bug !!!!
Depressed !! Most importantly, float: Left won't appear !!