Ajey
Ajey

Reputation: 8202

Half span in twitter bootstrap

I'm trying to build a page using twitter bootstrap and the span and offset classes work extremely smooth. But I was wondering is there a way to span half of the normal span in twitter bootstrap without overriding the span class?

Upvotes: 1

Views: 6140

Answers (3)

BENARD Patrick
BENARD Patrick

Reputation: 30975

I think in bootstrap2, if you want for exemple a span 1.5 , you can have a span3 with a span6 inside....

<div class="span3">
    <span class="span6">
             m 1.5
    </span>
</div>  

or

<div class="span1">
    <span class="span6">
             m 0.5
    </span>
</div>  

What do you think about it ?

Upvotes: 0

mrudult
mrudult

Reputation: 2570

For that you will need to use the fluid layout's. I guess making two div's of span6 inside a span3 div will give you two span1.5 div's.:

That is because each nested level of columns should add up to 12 columns.

<div class="span3">
 <div class="span6>
    ....span1.5.....
 </div>
 <div class="span6>
    ....span1.5.....
 </div>
</div>  

Check out Fluid Nesting in bootstrap.

Upvotes: 1

tommaso capelli
tommaso capelli

Reputation: 930

In Twitter Bootstrap <2.3.2 you can create fluid row in a span and inside of it 2 span6, so the 2 span6 will be always the half of the parent span.

<div class="span7">
    <div class="row-fluid">
         <div class="span6"></div>
         <div class="span6"></div>
    </div>
</div>

Upvotes: 5

Related Questions