I’m guite new to bootstrap and I’m trying to create a bootstrap grip that should look something like this:
Is it possible to have the blue primary box in the same grid as the rest, but only using the HTML tags? Or do I have to create my own CSS rules to achive this?
I have tried nesting the rows etc. But so far, I have not been able to achieve a good looking result.
<div class="col-md-9">
<div class="panel panel-default">
<div class="panel-heading">
Panel 1
</div>
<div class="panel-body">
content body
</div>
</div>
</div>
5
Answers
Use
panel-primary
class of bootstrap instead ofpanel-default
Also you should use
col-md-3
to fix this panel on right sidefor example
See official doc for other informations
Yes, it’s possible. You should start by creating one row with two columns. The first column will have 3 rows inside it and then more columns inside. Keep in mind the grid layout works from 1-12, so if your left part has a size of 9 then your panel on the right should take the remaining 3 for its column size.
It goes something like this:
You will need to add two columns, then place the panels within these columns. The first columns’ sizing will be 9 and 3.
The “Standard” panels will go inside the first column and the “Blue” panel will go into the second panel.
Inside the first column, the standard panels have been sized as 12 for the full width panel and 4 for each of the smaller panels. This is because the sizing is relative to the parent. The parent column has a width of 9 and so the child column sizing will be sized in 12th’s of that 9. Hope this makes sense.
You can do this, but you have to use Flexbox to get right panel same height as left side panels
Fiddle
When using Bootstrap Grid It should as simple as to add style=”float: right;” to the