Html Can';t中心盒-愚蠢的问题?
我正在尝试在div中获得3倍到中心的链接,名为“了解更多” 我试过Margin:Auto,Width 33%,text align:center,但似乎什么都不起作用 有人能帮帮我吗?这让我发疯了 以下是HTML:Html Can';t中心盒-愚蠢的问题?,html,css,Html,Css,我正在尝试在div中获得3倍到中心的链接,名为“了解更多” 我试过Margin:Auto,Width 33%,text align:center,但似乎什么都不起作用 有人能帮帮我吗?这让我发疯了 以下是HTML: 将链接放在一个单独的div中,然后文本对齐该div,如下所示: <div class="lm-links"> <a href""> Learn more </a> <a href""> Learn more </a>
将链接放在一个单独的div中,然后文本对齐该div,如下所示:
<div class="lm-links">
<a href""> Learn more </a>
<a href""> Learn more </a>
<a href""> Learn more </a>
</div>
好的,我想我有你需要的。我不得不调整其他一些东西,让他们都排好队
.supporting {
padding-top: 80px;
padding-bottom: 100px;
position: relative;
left: 200px;
}
.supporting img {
height: 32px;
position: relative;
left: -210px;
}
.supporting h2 {
font-weight: 600;
font-size: 23px;
text-transform: uppercase;
position: relative;
left: -210px;
}
.supporting p {
font-weight: 400;
font-size: 14px;
line-height: 20px;
padding: 0 50px;
margin-bottom: 40px;
position: relative;
left: -210px;
}
我只做了一件事,即在另一个元素(图)中添加了3个链接,并应用了此元素
text align:center
CSS:
HTML:
<div class="lm-links">
<a href""> Learn more </a>
<a href""> Learn more </a>
<a href""> Learn more </a>
</div>
.lm-links {
margin: 0 auto;
text-align: center; }
.supporting {
padding-top: 80px;
padding-bottom: 100px;
position: relative;
left: 200px;
}
.supporting img {
height: 32px;
position: relative;
left: -210px;
}
.supporting h2 {
font-weight: 600;
font-size: 23px;
text-transform: uppercase;
position: relative;
left: -210px;
}
.supporting p {
font-weight: 400;
font-size: 14px;
line-height: 20px;
padding: 0 50px;
margin-bottom: 40px;
position: relative;
left: -210px;
}
.supporting figure {
text-align: center;
}
<div class="supporting">
<figure>
<a href""> Learn more </a>
<a href""> Learn more </a>
<a href""> Learn more </a>
</figure>
<div class="container">