Home > Web Front-end > HTML Tutorial > LI tag serial_html/css_WEB-ITnose in IE

LI tag serial_html/css_WEB-ITnose in IE

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-24 12:08:55
Original
1744 people have browsed it

The last LI (8 in 1-8) in the first line of the following code will drop down one line in the IE browser, occupying the space of the second line. The second line of LI tags (a-h) are not serialized.
May I ask what is the reason for this?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css"><!--#c UL {	DISPLAY: inline;}#c UL LI {	BACKGROUND: #EFF7FF;	FLOAT: left;	WIDTH: 121px;	text-align: center;	margin: 1px;	height: 21px;	padding-top: 2px;list-style-type:none}--></style></head><body><table width="990" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#F47501">  <tr>    <td align="center"><table width="100%" cellspacing="0">      <tr>        <td bgcolor="#DDEEFF"><font color="#346F0E"><strong>标题</strong></font></td>      </tr>      <tr>        <td><div id="c"><ul>        <li>1</li>        <li>2</li>        <li>3</li>        <li>4</li>        <li>5</li>        <li>6</li>        <li>7</li>        <li>8</li>        <li>a</li>        <li>b</li>        <li>c</li>        <li>d</li>        <li>e</li>        <li>f</li>        <li>g</li>        <li>h</li>		</ul>        </div>		</td>      </tr>    </table></td>  </tr></table></body></html>
Copy after login


Reply to discussion (solution)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css"><!--#c UL {	margin: 0px;	padding: 0px;}#c UL LI {    DISPLAY: inline;    BACKGROUND: #EFF7FF;    FLOAT: left;    WIDTH: 121px;    text-align: center;    margin: 1px;    height: 21px;    padding-top: 2px;list-style-type:none}--></style></head><body><table width="990" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#F47501">  <tr>    <td align="center"><table width="100%" cellspacing="0">      <tr>        <td bgcolor="#DDEEFF"><font color="#346F0E"><strong>标题</strong></font></td>      </tr>      <tr>        <td><div id="c"><ul>        <li>1</li>        <li>2</li>        <li>3</li>        <li>4</li>        <li>5</li>        <li>6</li>        <li>7</li>        <li>8</li>        <li>a</li>        <li>b</li>        <li>c</li>        <li>d</li>        <li>e</li>        <li>f</li>        <li>g</li>        <li>h</li>        </ul>        </div>        </td>      </tr>    </table></td>  </tr></table></body></html>
Copy after login

Thank you!
Ties~~~

Related labels:
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template