使用CSS删除缩进 [英] removing ul indent with CSS
问题描述
我似乎无法从我的无序列表中删除缩进,当我的列表中的长行包围。以下是我的列表:
I cannot seem to remove the indent from my unordered list when long lines in my list wrap around. Here is what my list looks like:
- Windows用户可以使用putty
- Mac用户可以使用Terminal.app
- Linux用户可以使用SSH userid@ourserver.com端口22
- ...........>或者使用像Cyberduck的SFTP程序只是指向
................................... ......> ourserver.com,port 22
- Windows users can use putty
- Mac users can use the Terminal.app
- Linux users can use SSH userid@ourserver.com port 22
- ...........>Or use an SFTP program like Cyberduck just point it at .........................................>ourserver.com, port 22
(点显示缩进)
我读过一堆解决方案,并尝试使用text-indent,list-style设置margin和padding为零,但没有什么作用。我认为问题是列表上面有一个标题,我需要居中,所以我将边距设置为自动,然后它弄乱了下面的列表。但是,即使我把两个div放在父div中也不起作用。
I've read a bunch of solutions and tried setting margin and padding to zero, using text-indent, list-style, but nothing works. I think the problem is that there is a heading above the list that I need to be centered and so I'm setting the margins to auto and then it's messing up the list below. But even if I put say two divs inside the parent div it doesn't work.
这里是html / css正在导致所有其他解决方案失败)
Here is the html/css (I included everything in case there is some setting that is causing all of the other solutions to fail)
<div id="info">
<p><strong>Did you know you can SSH directly to ourserver.com?</strong> </p>
<ul>
<li>Windows users can use putty</li>
<li>Mac users can use the <a href="http://www.terminfo.org">Terminal.app</a></li>
<li>Linux users can use SSH userid@ourserver.com port 22</li>
<li>Or use an SFTP program like <a href="http://cyberduck.ch/">Cyberduck</a> just point it at ourserver.com, port 22</li>
</ul>
</div>
#info {
color:#FFFFFF;
width:440px;
margin-left:auto;
margin-right:auto;
border-radius: 10px;
border-style:solid;
border-width:2px;
border-color:#FFF;
padding-bottom:20px; padding-left:20px; padding-right:20px;
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#333333), to(#cccccc));
overflow: hidden;
}
#info ul li {
float:left;
}
推荐答案
/ p>
It works for me with
ul {
padding: 0;
list-style-type: none;
}
这篇关于使用CSS删除缩进的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!