如何减少引导中选择之间的填充

时间:2018-07-19 11:04:06

标签: css twitter-bootstrap twitter-bootstrap-3

.class-group在左右有一些填充,我如何减少它,我试图在左右添加零填充,但这没有用。我该怎么做呢?我需要在bootstrap 3.7中实现这一点

.selection-form > div {
    margin: auto;
}


.center {
    margin: 0 auto;
    text-align: center;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" rel="stylesheet"/>
<!DOCTYPE html>

    <div class="container">
   
         <section class="filter-appartment">
                 
            <div class="col-md-12">

               <form class="form-inline selection-form">

                     <div class="form-group col-md-2">
                       <select id="" class="form-control">
                         <option>Projects</option>
                       </select>
                     </div>

                     <div class="form-group col-md-2">
                       <select id="" class="form-control">
                         <option>Sale</option>
                       </select>
                     </div>

                     <div class="form-group col-md-2" > 
                       <select id="" class="form-control">
                         <option>Price</option>
                       </select>
                     </div>

                     <div class="form-group col-md-2">
                       <select id="" class="form-control">
                         <option>Disabled select</option>
                       </select>
                     </div>

                 </form>

            </div>
                    
           </section>   
      </div> 
               

https://jsfiddle.net/9ogjny53/4/

1 个答案:

答案 0 :(得分:1)

在要从中删除填充的元素上添加p-0类。

在这里学习:https://getbootstrap.com/docs/4.0/utilities/spacing/

查看更新后的fiddle