2010-11-01 78 views
0

我想使用下面的樣式類型來做水平列表,但是當使用display時:inline the square will not show。有什麼建議麼?CSS來定位水平列表

.vertical li {display: inline; list-style-type: square; padding-right: 5px;} 
+0

你爲什麼要將你的水平列表標爲「垂直」? – Malfist 2010-11-01 14:58:22

回答

4

你需要樣式列表和列表元素。使用float,不顯示:inline。

ul {list-style-type: square;} 
li {float:left;margin-left:25px;} 
2

use float:left; 你保護自己免受意外的結果,繼承與不同的對象