Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fill an entire Bootstrap row with content

I'm trying to figure out how to get the entire width of a bootstrap row to be filled by 3 child span4s. It looks like theres still space left over after the final span4. Last time I checked 3 x 4 was 12, so what am I missing?

<body>
    <div class="container">
        <div class="row" style="background-color:#eee; border: 1px solid #888;">
            <input name="srcCity" type="text" class="span4" placeholder="City">
            <select name="srcState" class="span4" data-country="US" data-state="CA"> </select>
            <input  name="srcZip" type="text" class="span4" placeholder="Zip">
        </div>
    </div>
</body>

https://jsfiddle.net/ujq2vxqc/

like image 802
user1250991 Avatar asked Nov 23 '25 18:11

user1250991


1 Answers

I think you using wrong class, instead use span4 (not exist in bootstrap.css file AFAIK) you can use col-xx-4 with xx can be xs,sm,md,lg up to you.
Some thing like:

    <body>
    <div class="container">
        <div class="row" style="background-color:#eee; border: 1px solid #888;">
            <input name="srcCity" type="text" class="col-sm-4" placeholder="City">
            <select name="srcState" class="col-sm-4" data-country="US" data-state="CA"> </select>
            <input  name="srcZip" type="text" class="col-sm-4" placeholder="Zip">
        </div>
    </div>
</body>
like image 119
Henry Varro Avatar answered Nov 26 '25 06:11

Henry Varro



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!