css - Changing a form to responsive and positioning it -
i'm new here apologies in advance not break rules. hoping assistance position of , domain search form on webpage , method make responsive if posible @ present submit button move underneath text entry if page small , gets further away input if page large. i'm new @ css (apart changing colours etc) advice appreciated.
i have positioned form @ present using:
.dm-reg { position: absolute; top: 55%; left: 20%; height: 100%; width: 65%; z-index: 10; }
will ensure screen size not affect position of form? have used jsfiddle , altered sizes , seems stay put, if ppossible centered horizontally @ times, without using left:20% possible?
i have set demo: http://jsfiddle.net/dtorr1981/vp0zwxsu/
you want this:
http://jsfiddle.net/vp0zwxsu/1/
the trick make wrapper wrapper 100% , center form within wrapper using margin: auto;
.dm-reg { position: absolute; top: 55%; height: 100%; width: 100%; z-index: 10; } form { width: 65%; margin: auto !important; }
note: included !important
on form margin because being overwritten normalize.css in jsfiddle, , wanted avoid changed html if possible; however, better way give form id , refer id in css.
Comments
Post a Comment