答案 0 :(得分:3)
您遇到的问题是填充正在应用于li
个元素。以下是整个区域可点击的小提琴(简化了边框底部规则):https://jsfiddle.net/eowznujs/
答案 1 :(得分:1)
使用css
li a {
display: inline-block;
width: 100%;
}
现在我明白了,你知道这一点。你的问题是在li元素上填充。只需为li元素指定填充:0并将填充应用于li a选择器,如此
li { padding: 0 }
li a { padding: 16px; }
答案 2 :(得分:1)
你去了:
#groupchats ul {
list-style-type: none;
}
#groupchats li{
border-bottom:1.5px solid #69f0ae;
background-color: #006064;
display: block;
padding: 0;
}
#groupchats li:last-child { border-bottom: none; }
#groupchats li a {
text-decoration: none;
display: inline-block;
width: 100%;
padding: 16px;
color: white;
}

<div class="row col-md-8 col-md-offset-2" id="groupchats">
<div id="groupchat-errors">
</div>
<ul id="groupchat-index" "demo-list-item mdl-list">
<li class="mdl-list__item"><a href="/groupchats/estset">one</a></li>
<li class="mdl-list__item"><a href="/groupchats/meandjess">two</a></li>
<li class="mdl-list__item"><a href="/groupchats/nooooo">three</a></li>
</div>
&#13;