html - Responsive Form on top of Responsive Image? - Bootstrap -
i trying place form on top of responsive image, , want form responsive , resize in relation image
currently image responsive cannot form stick in 1 place on image , resize in same position
is possible?
current code: http://www.codeply.com/go/ffgsrfictx
the following correspond form section of page have provided.
i have removed image element , used resource link background-image of form element. form fields wrapped bootstrap classes.
a min-height has been set on form element prevent distortion of background image.
html:
<!--- bootstrap style sheet --> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" /> <!-- form section --> <section id="contact class" class="container content-section text-center"> <h1 class="brand-heading">contact</h1> <div class="container-fluid"> <div class="row"> <!--- under grid system, 1 row has can have 12 columns we'll use 3 columns on each side spacing, 6 columns form. form done bootstrap way, less validation. need add in hte missing fields yourself. ---> <div class="col-md-3"></div> <div class="col-md-6"> <form id="responsiveform" action=""> <div class="form-group"> <label for="name">name:</label> <input type="text" class="form-control" id="name" name="name"/> </div> <div class="form-group"> <label for="email">email:</label> <input type="text" class="form-control" id="email" name="email"/> </div> <div class="form-group"> <label for="occasion">occasion:</label> <input type="text" class="form-control" id="occasion" name="occasion"/> </div> <div class="form-group"> <input type="submit" name="submit" class="form-control btn btn-primary" value="go"/> </div> </div> </form> </div> <div class="col-md-3"></div> </div> </div> </section> css:
#responsiveform{ background-image: url("http://s02.justpaste.it/files/justpaste/d233/a9446587/playingcardtemplate_small.png"); background-size: cover; background-size: 100% 100%; min-height: 650px; padding: 80px; padding-top: 120px; } see in codepen
edit: bit of thought on image. if want use background form. should form first, , find out size of form , shape image proportion.
Comments
Post a Comment