html - Catch-22 : I don't want my bullet points outside my div, 但我还希望链接文本左对齐

标签 html css

好吧,我已经问了一个关于如何让我的链接文本左对齐的问题:test wraps below bullet ul li .解决方案涉及将 list-style-position 更改为 outside。问题是我还想要我的 div 中的元素符号点。有解决这个问题的简单方法吗?

最佳答案

给包含的div添加内边距

http://jsfiddle.net/GX2yN/3/

div {
    padding:0 25px;
}

只是到 ul

.outside
{
    list-style-position: outside;
    padding: 0 25px;
    border: 1px solid red;
}

JSfiddle 2

关于html - Catch-22 : I don't want my bullet points outside my div, 但我还希望链接文本左对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23837458/

相关文章:

html - ng-init 和 ng-bind 有什么区别?

html - IE 11 伪元素::之前的绝对背景

javascript - Safari 在将 'animation-play-state' 设置为暂停时刷新页面

html - 在浏览器上放大和缩小时将内容保留在 div 中

javascript - HTML 网站设计,链接在页面上打开较小的窗口

javascript - 如何将当前日期的两天添加到隐藏输入的值

jquery - 根据文件扩展名更改图标

javascript - 在菜单外部单击时关闭菜单

css - box-shadow 在 IE9 中不起作用

css - -webkit-margin 在文本上添加不需要的边距