我在一个无序列表上的项目符号从它们的块元素中分离出来时遇到问题。这是正常的,还是项目符号不被视为文档流的一部分?
在这个小提琴中,我的无序列表有padding-left:0
,你可以看到子弹从它们的容器中推出。http://jsfiddle.net/E4WWu/1/
我不得不给无序列表一些填充来“修复”这里看到的问题:http: //jsfiddle.net/E4WWu/
我的问题是:为什么项目符号不包含在<ul>
元素中?是我的页面特定的东西,还是我缺少的 HTML/CSS 中的东西?
提前致谢。
HTML
<div class="center-midright-container">
<div class="infoBox"><span class="filler">Content Goes Here ...</span></div>
<div class="innerBottom">
<h3 class="instructHeader">Instructions<br/></h3>
<ul class="instructText">
<li>This is a list of instructions and this sentence is meant to be an item of the list. Each item can wrap around to the next line if it is long enough.</li>
<li>This is a list of instructions and this sentence is meant to be an item of the list. Each item can wrap around to the next line if it is long enough.</li>
<li>This is a list of instructions and this sentence is meant to be an item of the list. Each item can wrap around to the next line if it is long enough.</li>
</ul>
</div>
</div>
CSS
h3 {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
h3 {
color:#fff;
}
ul {
list-style-image:url('http://oi43.tinypic.com/wb8nz9.jpg');
padding-left:10px
}
h3.instructHeader {
text-decoration:underline;
text-align:center;
}
.center-midright-container {
margin:0 auto;
width: 700px;
}
.innerBottom {
width:80%;
border: 3px #b51700 ridge;
background-color:#000;
padding:10px;
margin:0 auto;
margin-top:25px;
}
.instructText {
text-align:left;
line-height:1.5;
color:#fff;
}
/* This is actually filled with content in my page. Here now just for a filler */
.infoBox {
height:500px;
background-color:#000;
text-align:center;
position:relative;
}
.filler {
position:relative;
top:47%;
color:#fff;
}