Andrew Andrew - 1 year ago 112
CSS Question

Two div's in one line(using col-md and col-md-offset Bootstrap)

I'm having two divs:

<div class="col-md-6 col-md-offset-1 "> </div>
<div class = "col-md-3 col-md-offset-9 "></div>

It looks like this:enter image description here

But I need it to look like this:

<div class="col-md-6"> </div>
<div class = "col-md-3"> </div>

enter image description here

But I need to use offset.

Answer Source

The count of columns in an entire row is always 12.

So, in your first code, you're reaching 19 columns therefore this is happening, you need to sum them up to 12.

section 1: offset 1 + width 6 = 7 then section 2: offset 2 + width 3 = 5

Total: 12

This should work. <div class="col-md-6 col-md-offset-1 "> </div> <div class = "col-md-3 col-md-offset-2 "></div>

or anything that adds up to 12.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download