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
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
Post a Comment