我正在尝试将文本对齐,如下所示:
投资和房地产应该一致,我需要调整房地产段落,以便对投资段落进行调整。
这是我的代码,
<div class="col-md-4 col-sm-6 col-xs-12 text-center ">
<div class="service-item">
<div class="service-icon">
<i class="fa fa-pie-chart fa-5x"></i>
</div>
<!-- <div class="larger"> ①</div> -->
<h3 style="font-size: 18px; font-family: 'Roboto', sans-serif;">InvestUp</h3>
<p style="font-size: 16px; font-family: 'Roboto', sans-serif;">Investup is the tool for the investor to track the progress of the project in a timely fashion and recieve curated updates! </p>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12 text-center" data-wow-delay="0.3s">
<div class="service-item">
<div class="service-icon">
<i class="fa fa-line-chart fa-5x"></i>
</div>
<!--<div class="larger"> ②</div> -->
<h3 style="font-size: 18px; font-family: 'Roboto', sans-serif;">CompareUp</h3>
<p style="font-size: 16px; font-family: 'Roboto', sans-serif;">Allows our investors to review the projects based on the most important factors, such as investment ammount, project timeline and location. </p>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12 text-center " data-wow-delay="0.6s">
<div class="service-item">
<div class="service-icon">
<i class="fa fa-users fa-5x"><br></i>
</div>
<!--<div class="larger"> ③</div> -->
<h3 style="font-size: 18px; font-family: 'Roboto', sans-serif;">NetworkUp</h3>
<p style="font-size: 16px; font-family: 'Roboto', sans-serif;"> Allowing you to become the part of the Estateup global community and connect with them in order to spread the investment tips. </p>
</div>
</div>
</div>
<!--Innovate in real estate -->
</div>
<hr style="color:#000000; width: 230px; display: block;
height: 1px;
border: 0;
border-top: 1px solid #000000;">
<!--Innovate in real estate-->
<div class="container">
<div class="col-md-12">
<h3 style="font-size: 18px; font-family: 'Roboto', sans-serif; text-align: justify; padding-left: 440px; letter-spacing: 0.3px; padding-bottom: 2px; ">Innovate in Real Estate</h3>
<p style="font-size: 16px; font-family: 'Roboto', sans-serif; text-align: center; margin-right:20px; "><br> Real Estates transactions have always had four parties involved. The buyer, the buyers broker, the seller and the sellers broker.</p>
我的padding-right
不知何故不起作用。有人可以告诉我这里做错了吗?
答案 0 :(得分:0)
如果您提供完整的代码,我们可以为您提供更好的帮助。如果我理解你的话,这可能会有所帮助。
我需要稍微移动房地产
为此,您可以使用padding-left
或margin-left
来管理元素左侧网站的空间。知道填充和边距之间的区别会有所帮助,你可以阅读这个here。
我建议将两个元素放在一个DIV
中并为此分配边距。这为两个元素分配了相同的余量。
修改强>
您添加了代码,所以我的解决方案:
<div class="content">
<h3 style="font-size: 18px; font-family: 'Roboto', sans-serif;">InvestUp</h3>
<p style="font-size: 16px; font-family: 'Roboto', sans-serif;">Investup is the tool for the investor to track the progress of the project in a timely fashion and recieve curated updates!</p>
<p style="font-size: 16px; font-family: 'Roboto', sans-serif;"><br> Real Estates transactions have always had four parties involved.</p>
<div class="sec-title text-center" style="padding-bottom:3px; ">
<div id="" class="btn-group btn-group-lg text-center" role="group">
<button type="button" class="btn btn-primary text-center" style=" width:300px;height:60px; font-weight:800; font-size:18px;font-family: 'Roboto', sans-serif;
" style="">Enter Now</button>
</div>
</div>
</div>
现在,您可以使用css:
为“内容”类指定边距.content{
margin-left: 20px
}
答案 1 :(得分:0)
我已将两个段落对齐,如果你想要你也可以将它对齐中心,请检查下面的代码
<h3 style="font-size: 18px; font-family: 'Roboto', sans-serif;">InvestUp</h3>
<p style="font-size: 16px; font-family: 'Roboto', sans-serif; text-align: left; margin-right:20px; padding-right:20px; ">Investup is the tool for the investor to track the progress of the project in a timely fashion and recieve curated updates! </p>
<p style="font-size: 16px; font-family: 'Roboto', sans-serif; text-align: left; margin-right:20px; padding-right:20px; "><br> Real Estates transactions have always had four parties involved.</p>
<div class="sec-title text-center" style="padding-bottom:3px; ">
<div id="" class="btn-group btn-group-lg text-center" role="group">
<button type="button" class="btn btn-primary text-center" style=" width:300px;height:60px; font-weight:800; font-size:18px;font-family: 'Roboto', sans-serif;
" style="">Enter Now</button>
</div>
</div>