I have a five column grid. I’ve initially set them up as so:
<div class="row">
<div class="span1">...</div>
<div class="span3">...</div>
<div class="span1">...</div>
<div class="span4">...</div>
<div class="span1">...</div>
</div>
The first column contains one of two icons, both of the same width: 18px. span1 resolves to 60px, however, so there’s a lot of wasted space.
How do I declare a column that’s 18px?
This only affects one page of my app, so it’s not enough to customise the entire Bootstrap CSS, right?
You can add your own class:
Then add the class to your tag:
Or even use inline css (but it’s less clean)
Every class containing “span” will get a
margin-leftof 30px and be set asfloat:leftso you just need to specify the margin-right and width properties.This is because of the
[class*="span"]selector inbootstrap.cssIn this example, I set a margin-right of 52px to keep the grid system, but you can change it to 10px if you don’t want wasted space.