Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"Form Login Label and Input together "
Bootstrap 3.0.0 Snippet by
ricardorodh
3.0.0
jQuery
login
input
Preview
HTML
CSS
JS
View Full Screen
Fork
Fork this
4.0K
 
1 Fav
Post to Facebook
Tweet this
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="modal fade" id="login-modal" > <form id="loginform" class="form-horizontal" role="form"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header "> <h4 class="modal-title " id="myModalLabel"><span class="glyphicon glyphicon-lock"></span> ACCESS PANEL</h4> </div> <div class="modal-body"> <div id="login"> <section class="login_content" > <div class="input-bx"> <label for="form_user">E-mail</label> <input id="form_user" name="form_user" type="text" class="form-control" required="" /> </div> <div class="input-bx"> <label for="form_pass">Password</label> <input id="form_pass" name="form_pass" type="password" class="form-control" required="" /> </div> </section> </div> </div><!-- /.modal-body --> <div class="modal-footer"> <div class="text-info " id="sendpass">Send me password, please</div> <button type="button" id="register" class="btn btn-primary"><span class="glyphicon glyphicon-hand-right"></span> Register</button> <button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-ok"></span> Acessar</button> </div><!-- /.modal-footer --> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </form><!-- form --> </div>
.input-bx label { position: relative; display: inline; top: 25px; padding-left: 10px; color: #8D8D7B; font-weight: normal; } .input-bx input{ padding-left: 10px; padding-top: 20px; } .input-bx input:focus{ height: 60px; } .input-bx-focus{ border: 1px solid green; background-color: rgb(250, 255, 189); -webkit-box-shadow: 1px; -moz-box-shadow: 1px; box-shadow: 1px; padding: 3px; padding-left: 10px; } .input-bx-focus-out-true{ height: 60px; } .input-bx-focus-out-false{ height: 30px; }
$(document).ready(function(){ $(".input-bx").on('focus', 'input',function(){ $('label[for='+$(this).attr('id')+']').addClass('input-bx-label'); $(".input-bx input").addClass('input-bx-focus'); }); $(".input-bx input").on('blur',function(){ if($(this).val()!=""){ $(this) .addClass('input-bx-focus-out-true') .removeClass('input-bx-focus-out-false'); }else{ $(this) .addClass('input-bx-focus-out-false') .removeClass('input-bx-focus-out-true'); } }); $('#login-modal').modal('show'); });
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76