【发布时间】:2021-04-07 05:50:24
【问题描述】:
我的 .一些按钮居中,而其他按钮未居中。
<style type="text/css">.btn {
background-color:transparent;
border-radius:28px;
border:1px solid #67823A;
display:inline-block;
cursor:pointer;
color:#67823A;
font-family:Tahoma;
font-size:14px;
padding:4px 13px;
text-decoration:none;
position: absolute;
bottom: 5%;
left: 10%;
}
.btn:hover {
background-color:#67823A;
border-color:#67823A;
}
编辑:
下面列出的是 HTML 代码。
请记住,我正在通过 SaaS 应用程序编辑此代码,该应用程序提供了编辑 html/css 代码的能力。从外观上看,我已经有了一个包含按钮选项的 div。
<div class="col-12 col-md-6 col-lg-4 py-3 text-center border"><img class="img-fluid" font-family:lucida="" sans=""
src="/images/contentimages/images/Newsletter.png" /></a>
<p class="my-3" style="font-size:18px;"> </p>
<a class="btn btn-info btn-sm edatalayer order-1" data-list="product-listing-page" data-position="1"
data-purl="custom-business-forms" href="http://example.com/">Newsletters <i
class="far fa-chevron-right pl-1"></i></a>
</div>
<div class="col-12 col-md-6 col-lg-4 py-3 text-center border"><a
href="http://example.com/"><img class="img-fluid"
font-family:lucida="" sans="" src="/images/contentimages/images/Presentation_Folder.png" /></a>
<p class="my-3" style="font-size:18px;"> </p>
<a class="btn btn-info btn-sm edatalayer order-1" data-list="product-listing-page" data-position="1"
data-purl="custom-business-forms"
href="http://example.com/">Presentation Folders <i
class="far fa-chevron-right pl-1"></i></a>
</div>
<div class="col-12 col-md-6 col-lg-4 py-3 text-center border"><a
href="http://example.com/"><img class="img-fluid" font-family:lucida=""
sans="" src="/images/contentimages/images/Foldover_Business_Cards.png" /></a>
<p class="my-3" style="font-size:18px;"> </p>
<a class="btn btn-info btn-sm edatalayer order-1" data-list="product-listing-page" data-position="1"
data-purl="custom-business-forms" href="http://example.com/">Foldover
Business Cards <i class="far fa-chevron-right pl-1"></i></a>
</div>
</div>
【问题讨论】:
-
寻求代码帮助的问题必须包含重现它所需的最短代码在问题本身中最好在Stack Snippet 中。见How to create a Minimal, Reproducible Example
-
你应该分享你的完整代码,不清楚
标签: html css button css-position absolute