I am just having fun building my own stuff with bootstrap. I am wondering what is the best way to add a border to a container with Bootstrap 3? I am having a hard time finding built in functionality in bootstrap and I am wondering what the best way to do it is for the code below if I want the text to be enclosed in a border.
<div class="container-fluid">
<div class="row">
<div class="col-md-12"><p class="text-center">Welcome.</p></div>
</div>
</div>
Well you could add the below to your css
.container-border{
border: 1px solid #ccc;
border-radius: 15px;
}
<div class="container-fluid container-border">
<div class="row">
<div class="col-md-12"><p class="text-center">Welcome.</p></div>
</div>
And this would create a border around the text as desired.
Alternatively you could use .panel in Bootstrap (assuming you are using 3.x)
<div class="panel panel-default">
<div class="panel-body">
<p class="text-center">Welcome.</p>
</div>
</div
https://jsfiddle.net/3wcvf8t4/4/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With