简体   繁体   English

更改已有 div 容器和 div 行的引导模板

[英]Changing a bootstrap template that already has a div container and div row

I am attempting to use a basic bootstrap template, I have added a:我正在尝试使用基本的引导程序模板,我添加了一个:

<div class="container"><div class="row">
    <div class="col-md-6">
        <p>This is the text I would like to align left</p>. 
    </div>
</div>

However the bootstrap template I have used has text center align - how do I add a rule just for this paragraph to align left ?但是,我使用的引导程序模板具有文本居中对齐 - 如何仅为此段落添加规则以向左对齐? (where and what would it be called?) I should add that I have one css document for the website and can't add to the main class - I need to make a rule just for this area. (它在哪里以及它会被称为什么?)我应该补充一点,我有一个用于网站的 css 文档并且不能添加到主类中 - 我需要为这个区域制定一个规则。

<div class="container">
  <div class="row">
    <div class="col-md-6">
       <p class = "text-left">This is the text I would like to align left</p>
    </div>
  </div>
</div>

Use this it will align the left side.使用它会对齐左侧。 (class = "text-left" on the paragraph tag). (段落标签上的class =“text-left”)。

You forgot to close your row div also "text-left" class should be used there like this:你忘记关闭你的行 div 也应该像这样在那里使用“text-left”类:

<div class="container">
    <div class="row">
        <div class="col-md-6">
            <p class="text-left">This is the text I would like to align left</p>. 
        </div>
    </div>
</div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM