Andrew
Andrew

Reputation: 6900

Border around bootstrap container?

I have a container that contains two rows. I want there to be a border around the container (not between the two rows). When I tried to set a border around the container, it gave me a border between the two rows - not sure what I should be doing differently here.

<div class="container-fluid" style="border:1px solid #cecece;"  
    <div class="row">                                           
      <!-- Need to add theme, buttons -->                       
      <div class="col-xs-12"> Text here </div>          
    </div>                                                      
    <div class="row">                                           
      <!-- Need to add theme, buttons -->                       
      <div class="col-xs-12"> Buttons here </div>               
    </div>                                                      
</div>                                                          

Upvotes: 11

Views: 63129

Answers (3)

Aleksandar
Aleksandar

Reputation: 1

<div class="container-fluid table-bordered">
    <div class="row">                                           
          <!-- Need to add theme, buttons -->                       
        <div class="col-xs-12"> Text here </div>          
    </div>
</div>

Upvotes: 0

curty005
curty005

Reputation: 31

<div class="container-fluid" style="border:1px solid #cecece;">  
    <div class="row">                                           
          <!-- Need to add theme, buttons -->                       
        <div class="col-xs-12"> Text here </div>          
    </div>                                                      
        <div class="row">                                           
          <!-- Need to add theme, buttons -->                       
        <div class="col-xs-12"> Buttons here </div>               
        </div>                                                      
    </div>            

Upvotes: 3

Adam Lesniak
Adam Lesniak

Reputation: 878

Your code is almost perfectly fine.

Look at first line of it - > is missing.

See working example below.

http://jsfiddle.net/864cw2fn/

Upvotes: 14

Related Questions