不确定为什么第二个列表中的文字没有居中。
HTML
<div id="the_target">
<ul>
<li>Stephen Marston</li>
<li>Account Exectutive</li>
<li>The Company</li>
</ul>
</div>
SASS:
section {
#the_requestor {
margin-top: 40px;
ul { margin-top: 10px; }
ul li {
text-align: center;
line-height: $px20;
}
li:first-child {
font-family: LatoBold;
font-size: $px30;
background: cyan;
}
}
#the_target {
position: relative;
margin-top: 40px;
ul { margin-top: 10px; }
ul li {
text-align: center;
line-height: $px20;
}
li:first-child{
font-family: LatoBold;
font-size: $px30;
background: cyan;
}
}
}
关于什么可能迫使斯蒂芬马斯顿不在中心的任何想法?
答案 0 :(得分:5)
#mobile-action-area
中存在一个正在干扰的元素。你需要清除这个浮动。有多种方法可以做到这一点。将overflow: hidden
添加到#mobile-action-area
会修复它。您也可以尝试:
#mobile-action-area:after {
display: table;
content: "";
clear: both;
}
答案 1 :(得分:2)
你需要在#the_target
之前清除浮动 #the_target {
position: relative;
margin-top: 40px;
clear:both;
}