So there are a few issues with the snippet you've supplied, and they come down to what Bootstrap expects when rendering the layout.
Here is the basic use of the col
tag in Bootstrap and it's expected outer Grid Layout.
<div class="container">
<div class="row">
<div class="col-sm">
One of three columns
</div>
<div class="col-sm">
One of three columns
</div>
<div class="col-sm">
One of three columns
</div>
</div>
</div>
As you can see, a container
must wrap a row
which then contains a col
element.
As per Bootstrap Rows and Columns - Do I need to use row?:
Yes, you need to use row. Only columns may be immediate children of rows
Here is your amended code as a result of these required rules:
<div class="container">
<div class="card">
<div class="card-block">
<div class="row">
<div class="time col-2"></div>
<div class="card-body col-8">write tasks here</div>
<button class="saveIcon col-2">
<i class="fa fa-lock"></i>
</button>
</div>
</div>
</div>
</div>
Also, please ensure you're correctly referencing Bootstrap in your head: Bootstrap Get Started
Here is the JSFiddle showing the working output with Bootstrap.