html - 段落未使用 <p> 标记对齐

标签 html css

我正在尝试对齐我的文本,如下所示:

enter image description here

Investup 和 Real estate 应该对齐,我需要将 Real estate 段落与 invest up 段落对齐。

这是我的代码,

 <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"> &#9312;</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"> &#9313;</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">  &#9314;</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 不知何故无法正常工作。有人可以告诉我这里做错了什么吗?

最佳答案

如果您提供完整的代码,我们可以更好地帮助您。如果我理解你是对的,这无论如何都会有帮助。

i need to move the Real estate a bit left

为此,您可以使用 padding-leftmargin-left 来管理元素左侧的空间。了解 padding 和 margin 之间的区别会有帮助,您可以阅读此内容 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
}

关于html - 段落未使用 <p> 标记对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40762056/

相关文章:

php - 从 MySQL 数据库检索保存的文本

javascript - 如何在html中的上传按钮旁边打印输入文件的名称

html - Bootstrap 输入字段不居中

python - 我想检查 html 文本作为条件,但是我应该如何处理 &nsbp 或 &#160?

css - CSS 中图像最大宽度 50%

javascript - 仅当鼠标向下滚动到该特定部分时,是否可以开始动画此文本效果?

javascript - 无法确定带有附加子项的 HTML 页面的行为

html - 如何从上下文菜单中删除默认菜单上下文

php - 我使用 cakephp3.4.13 进行验证时发生了什么?

css - 使用具有相邻兄弟的属性选择器