Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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>                                                          
like image 451
Andrew Avatar asked Nov 17 '15 16:11

Andrew


2 Answers

<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>            
like image 127
curty005 Avatar answered Oct 03 '22 20:10

curty005


Your code is almost perfectly fine.

Look at first line of it - > is missing.

See working example below.

http://jsfiddle.net/864cw2fn/

like image 28
Adam Lesniak Avatar answered Oct 03 '22 22:10

Adam Lesniak