html - How to center a form in the middle of bootstrap container? -
i tried give form 1 email input field , button image. button , input aligned side side. want center form in middle of bootstrap container class, nil have tried has worked. gave form width , margin:0 auto, didn't help @ all.
html:
<div class="container"> <div class="text-box-two"> <span id="notification">be notified when launch:</span> </div> <form class="well email-form form-inline" id="emailform" name="sendemail" novalidate="" method="post"> <div class="col-sm-6"> <div class="form-group"> <input class="form-control" name="email" id="email-address" type="email" placeholder="enter email address" required="" data-validation-required-message=" "/> </div> <div class="form-group button"> <input type="image" src="images/tree.png" name="submitemail" class="button"/> </div> </div> </form> </div> </div>
css:
.well.email-form{ background-color: #ffffff !important; border: none !important; border-radius: 1px !important; } #emailform{ width:1115px; margin:0 auto; } .form-group{ float:left; } #emailform{ margin:0 auto; } .form-control{ height:102px; border-radius:1px; font-size:30px; }
use bootstrap framework this. have @ offsetting columns in docs.
try in container above.
<div class="container col-sm-8 col-sm-offset-2">
here's fiddle working.
html twitter-bootstrap
No comments:
Post a Comment