forms - background-color applies only to part of a div in bootstrap , when it should apply to the whole div -


i have form in website building following html using bootstrap

<div class="hotel-search side-menu blue-background ">       <h2>search</h2>       <hr/>       <br/>      <form class="hotel-search-form">         <div class="form-group  col-md-12">           <label for='nationanlity'>nationality</label>           <select class="chosen form-control"  name="nationanlity" placeholder="please select nationality">                 <option value="">select nationality</option>                 <option value="...">...</option>           </select>         </div>        <div class="form-group col-sm-6">              <select class="chosen form-control" id="country" name="country" placeholder="please select country">                  <option value="">select country</option>                  <option selected="selected" value="uae">uae</option>            </select>        </div>         <div class="form-group col-sm-6">             <select class="chosen form-control" id="city" name="city"     placeholder="please select city">                    <option value="">select city</option>                    </select>        </div>        <div class="form-group  col-md-12">            <label for="hotel">hotel name</label>            <input type="text" class="form-control" id="hotel"     placeholder="hotel name">           </div> </form> 

the css applies form .blue-background { background-color: #010118; } css. problem set background color part of form

image file]([![https://www.dropbox.com/s/ahxlkc9pixm49x8/stackoverflow.png?dl=0

this has happened few time before, , works fine when add .row main div, causes alignment go bad, can explain me why happening? , possible solution? thanks.

adding

display:table;  

to main form div seems solve problem, have no idea why not work without it.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -