如何将图像与右边的段落对齐

问题描述 投票:0回答:1

sampe of my image "as is"我正在尝试在页面上已经有关于我们的段落旁边添加图片,但该图片未正确对齐,因此该图片的位置比该段落的位置高。

im使用html和CSS

      <div class="container-fluid">
        <div class="row">
          <div class="col-sm-8" id="About Us" style="padding-top:85px;padding-bottom:90px">
            <h2>About Us</h2>
            <h5>In 1987, ronald founded KYB Company with emphasis on providing to local residential buildings, in all five boroughs within New York City, with all of their exterior and interior restoration needs.  After, nearly 32 years in the business, KYB Company continues to hold onto its initial mission of focusing efforts on building and maintaining long lasting client relationships..</h5>      
            <p>They have built the company by offering the highest quality of service and customer care and they continue to lead the industry as a partner to their clients in both the restoration and FISP (local law 11/98). For this reason, KYB COmpany are fortunate to contract with clients that have been with them from their inception.</p>


          </div>
          <div class="col-sm-1"></div>
          <img src="castor2.jpg" class="img-thumbnail" alt="castor" style="width: 170px; height: 200px;">

我希望图像与段落对齐,而不是高于段落本身。enter image description here

html image bootstrap-4 alignment
1个回答
1
投票

从“关于我们” padding-top:85px中删除div样式属性-这会创建一个85px高的空白,这显然是您不需要的。

© www.soinside.com 2019 - 2024. All rights reserved.