Bootstrap填充BG颜色

时间:2017-05-04 05:37:07

标签: css twitter-bootstrap

这是我的网页http://www.noor-azmi.com/element/company.html

如您所见,顶部有2个灰色框。我不希望它们之间存在差距。我想把它合并成一个矩形框。

它们都在不同的列中,左边是col-8,右边是col col-4。当我在浏览器中检查时,它们之间似乎有15px的填充。

我可以使用填充,但填充也可以具有相同的BG颜色?那将解决问题。感谢

2 个答案:

答案 0 :(得分:0)

将灰色部分分成另一排,你很高兴。

 <div class="row">
         <div class="our_company col-sm-8">
                             <h2>Our Company</h2><br>

                            <p>As the name indicates, Element Design Studio is a boutique design studio that provides landscape master planning and full serviced landscape architecture services for hotels, resorts, residential developments, mixed-use projects and golf course landscapes. Headquartered in Singapore, Element was co-founded by Gregory Kunak in 2011 based on simple and straightforward fundamentals; to provide Clients with the highest quality design services.<br><br>
                    Since 2011, Element has provided design services for a vast amount of projects located in 16 countries, consisting of Bangladesh, Egypt, Guinea, India, Indonesia, Laos, Kenya, Korea, Malaysia, Mauritius, Nepal, Saudi Arabia, Seychelles, Singapore, Sri Lanka and Vietnam. <br><br>
                                Whether appointed to provide landscape master planning services on a 100 hectare mixed-use development or engaged to provide detailed landscape design services for a hotel, resort or luxury residential condominium, Element takes immense pride with providing the highest quality of design excellence throughout every stage of the project. Above all, it is our fundamental goal to ensure that our Clients achieve a successful landscape product.</p><br>

                            </div><div class="our_leader col-sm-4">
                        <h2>Our Leadership</h2><br>

                        Gregory Kunak<br>
                        <h3>Managing Director</h3>
                                 <img src="image/Gregory-Kunak-Profile.jpg">
                                <p>After working for 20 years with two of the largest and most prominent landscape architecture firms in the United States and Singapore, Gregory Kunak co-founded Element in 2011.<br><br>  Through his career, Gregory has gained extensive design experience on many notable hotels, resorts, residential developments and mixed-use projects throughout the United States, Caribbean, Middle East and majority of Asia. As Managing Director of Element, Gregory is responsible for every aspect of the company.<br><br> As a registered landscape architect, Gregory is responsible for ensuring that each and every project adheres to the most stringent health, safety and welfare standards while striving to achieve design excellence.  He is a rollercoaster enthusiast, enjoys the outdoors and horticulture and supports the Pittsburgh Steelers. </p></div>

      </div>.

答案 1 :(得分:0)

试试这个, 您需要在div

中进行更改

HTML代码:

<div class="row">
   <div class="col-md-12 bg-grey">
      <div class="col-md-8">
         This is col 1
      </div>
      <div class="col-md-4">
         This is col 2
      </div>
   </div>
</div>

CSS代码:

.bg-grey {
   background-color: grey;
}