"Clean Modal Login Form"
Bootstrap 3.3.0 Snippet by taliwalt

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.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 ----------> <a href="#" data-toggle="modal" data-target="#profile-modal">profile</a> <div class="modal fade" id="profile-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;"> <div class="modal-dialog"> <div class="profilemodal-container"><!--profilemodal-container--> <h1>Player Profile</h1><br> <form> <input type="text" name="user" id="player_name" placeholder="Pick a Name"> <div class="container col-xs-12"> <h4>Pick Your Avatar</h4> <div class="row form-group avatar-chooser"><!--div.product-chooser--> <div class="col-xs-4"><!--col-4--> <div class="avatar-chooser-item"><!--div.product-chooser-item --> <img src="http://i.imgur.com/yg9ANDt.png" class="img-rounded col-xs-12" alt="yoda"> <div class="col-xs-12"><!--col-xs-12--> <input type="radio" name="avatar" value="yoda"> </div><!--END-col-xs-12--> <!--<div class="clear"></div>--> </div><!--END-product-chooser-item--> </div><!--END-col-4--> <div class="col-xs-4"><!--col-4--> <div class="avatar-chooser-item"><!--product-chooser-item --> <img src="http://i.imgur.com/EAF7AQz.png" class="img-rounded col-xs-12" alt="Darth Vader"> <div class="col-xs-12"><!--col-xs-12--> <input type="radio" name="avatar" value="darth_vader"> </div><!--END-col-xs-12--> <!--<div class="clear"></div>--> </div><!--END-product-chooser-item--> </div><!--END-col-4--> <div class="col-xs-4"><!--col-4--> <div class="avatar-chooser-item"><!--product-chooser-item --> <img src="http://i.imgur.com/piRYBmh.png" class="img-rounded col-xs-12" alt="Princess Leah"> <div class="col-xs-12"><!--col-xs-12--> <input type="radio" name="avatar" value="leah"> </div><!--END-col-xs-12--> <!--<div class="clear"></div>--> </div><!--END-product-chooser-item--> </div><!--END-col-4--> </div><!--END-product-chooser--> </div><!--END-container --> </form><!--END-FORM--> <input type="submit" name="save" class="profile profilemodal-submit" data-dismiss="modal" value="Submit"> </div><!--END-profilemodal-container--> </div><!--END-modal-dialog--> </div><!--END-modal-fade-->
@import url(http://fonts.googleapis.com/css?family=Roboto); /****** profile MODAL ******/ .profilemodal-container { padding: 30px; max-width: 450px; width: 100% !important; background-color: #F7F7F7; margin: 0 auto; border-radius: 2px; /* box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);*/ overflow: hidden; font-family: roboto; } .profilemodal-container h1 { text-align: center; font-size: 1.8em; font-family: roboto; } .profilemodal-container input[type=submit] { width: 100%; display: block; margin-bottom: 10px; position: relative; } .profilemodal-container .btn.profilemodal-ok { width: 50%; display: inline-block; margin-bottom: 10px; position: relative; } .profilemodal-container .btn.profilemodal-dismiss { width: 50%; display: block; float: left; margin-bottom: 10px; position: relative; } .profilemodal-container input[type=text], input[type=password] { height: 44px; font-size: 16px; width: 100%; margin-bottom: 10px; -webkit-appearance: none; background: #fff; border: 1px solid #d9d9d9; border-top: 1px solid #c0c0c0; /* border-radius: 2px; */ padding: 0 8px; box-sizing: border-box; -moz-box-sizing: border-box; } .profilemodal-container input[type=text]:hover, input[type=password]:hover { border: 1px solid #b9b9b9; border-top: 1px solid #a0a0a0; -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); } .profilemodal { text-align: center; font-size: 14px; font-family: 'Arial', sans-serif; font-weight: 700; height: 36px; padding: 0 8px; /* border-radius: 3px; */ /* -webkit-user-select: none; user-select: none; */ } .profilemodal-submit { /* border: 1px solid #3079ed; */ border: 0px; color: #fff; text-shadow: 0 1px rgba(0,0,0,0.1); background-color: #4d90fe; padding: 17px 0px; font-family: roboto; font-size: 14px; /* background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4d90fe), to(#4787ed)); */ } .profilemodal-submit:hover { /* border: 1px solid #2f5bb7; */ border: 0px; text-shadow: 0 1px rgba(0,0,0,0.3); background-color: #357ae8; /* background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4d90fe), to(#357ae8)); */ } .profilemodal-container a { text-decoration: none; color: #666; font-weight: 400; text-align: center; display: inline-block; opacity: 0.6; transition: opacity ease 0.5s; } .profile-help{ font-size: 12px; } div.avatar-chooser div.avatar-chooser-item{ padding: 8px; border-radius: 6px; cursor: pointer; position: relative; border: 1px solid #efefef; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; display: inline-block; } div.avatar-chooser div.avatar-chooser-item.selected{ border: 2px solid #428bca; background: #efefef; padding: 3px; filter: alpha(opacity=100); opacity: 1; display:inline-block; } div.avatar-chooser div.avatar-chooser-item img{ padding: 0; } div.avatar-chooser div.avatar-chooser-item input{ position: absolute; left: 0; top: 0; visibility:hidden; }
$(function(){ $('div.avatar-chooser').not('.disabled').find('div.avatar-chooser-item').on('click', function(){ $(this).parent().parent().find('div.avatar-chooser-item').removeClass('selected'); $(this).addClass('selected'); $(this).find('input[type="radio"]').prop("checked", true); }); }); var $profileModal = $("#profile-modal"), var $profileModalPlayerName = $("#player_name"); $profileModal.on("shown.bs.modal", function() { document.activeElement.blur(); $profileModalPlayerName.focus(); });

Related: See More


Questions / Comments: