Why does the css:list-style-type attribute often not work?

黄舟
Release: 2017-06-29 13:47:28
Original
3298 people have browsed it

If you set list-style-type:disc under IE6, a solid dot should appear, but it does not appear, such as the following 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; charset=utf-8" />
<title>处理IE的列表BGU</title>
</head>
<style type="text/css">
ul{list-style:disc outside;width:350px;height:auto;}
ul li{width:350px;line-height:30px;}
</style>
</head>
<body>
<ul>
<li>酷站代码1</li>
<li>酷站代码2</li>
<li>酷站代码3</li>
<li>酷站代码4</li>
<li>酷站代码5</li>
</ul>
</body>
</html>
Copy after login

Reason: applied list-style-position: outside; caused by the attribute.

Left floating will make box modelHorizontal rehearsal one by one

The position of the list symbol is outside the box model

So the second list item symbol is covered by the first list item

In addition, applying the float:left; attribute will also cause the LI element to be abnormal.

Solution: Change list-style-position:outside; to list-style-position: inside; or remove the floating setting.

The above is the detailed content of Why does the css:list-style-type attribute often not work?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!