I've built a modal window as seen in my modal HTML and CSS code below and was looking for any tips/advice regarding how well I've applied any best practices in both my HTML and styling with regards to building a modal window.
Here's the tutorial I followed.
Here's my modal HTML code:
<div class="modal fade" id="basicModal" tabindex="-1" role="dialog" aria-labelledby="basicModal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal_header">
<div class="modal_title">Log In</div>
</div>
<div class="modal_body">
<div class="log_in_div_option_a">
<a class="btn-auth btn-facebook large" href="#">Log in with <b>Facebook</b></a>
</div>
<div class="log_in_div_option_b">
<a class="btn-auth btn-google large" href="#">Log in with <b>Google</b></a>
</div>
<hr class="hr"></hr>
<p class="log_in_div_option_c">Or log in using your e-mail</p>
<div>
<input title="Enter username" class="firstname" name="firstname" type="text" required placeholder="Enter e-mail">
</div>
<div>
<input title="Re-enter password" class="reenterpassword" name="reenterpassword" type="password" required placeholder="Enter password">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn_close" data-dismiss="modal">Close</button>
<button type="button" class="btn_log_in">Log In</button>
</div>
</div>
</div>
</div>
Here's my modal CSS code:
/* */
.modal_header{
min-height:16.43px;
padding:15px;
border-bottom:1px solid #e5e5e5;
background-color: #A2E55A;
}
/* */
.modal_title{
font-size: 25px;
color: #999999;
font-family:'Trebuchet MS', Tahoma, Sans-serif;
background-color: #A2E55A;
color: #FFFFFF;
}
/* */
.modal_body{
position:relative;
padding:15px;
background-color: #FFFFFF;
}
/* */
.log_in_div_option_a {
font-family:'Trebuchet MS', Tahoma, Sans-serif;
background-color: #FFFFFF;
}
/* */
.log_in_div_option_b {
font-family:'Trebuchet MS', Tahoma, Sans-serif;
margin-top: 15px;
background-color: #FFFFFF;
}
/* */
.log_in_div_option_c {
font-family:'Trebuchet MS', Tahoma, Sans-serif;
color: #999999;
font-size: 20px;
font-weight: bold;
}
/* Log In button */
.btn_log_in {
right: 0px;
width: 150px;
height: 36px;
border:none;
font-weight: normal;
font-size: 20px;
margin-top: 0px;
background: #CCC;
background: -webkit-linear-gradient(#A2E55A,#A2E55A 50%,#A2E55A 51%,#A2E55A);
background: -moz-linear-gradient(#A2E55A,#A2E55A 50%,#A2E55A 51%,#A2E55A);
background: -ms-linear-gradient(#A2E55A,#A2E55A 50%,#A2E55A 51%,#A2E55A);
background: -o-linear-gradient(#A2E55A 0%,#A2E55A 50%,#A2E55A 51%,#A2E55A);
background: linear-gradient(#A2E55A,#A2E55A 50%,#A2E55A 51%,#A2E55A);
-pie-background: linear-gradient(#A2E55A,#A2E55A 50%,#A2E55A 51%,#A2E55A);
-webkit-border-radius: 4px 4px 4px 4px;
-moz-border-radius: 4px 4px 4px 4px;
border-radius: 4px 4px 4px 4px;
-webkit-box-shadow: inset 1px 0 0px rgba(255,255,255,.4);
-moz-box-shadow: inset 1px 0 0px rgba(255,255,255,.4);
box-shadow: inset 1px 0 0px rgba(255,255,255,.4);
color: #F5F5F5;
}
/* */
.btn_log_in:hover,
.btn_log_in:focus,
.btn_log_in.focus,
.btn_log_in:active,
.btn_log_in.active {
background: -webkit-linear-gradient(#71A03F,#71A03F 50%, #71A03F 51%);
background: -moz-linear-gradient(#71A03F,#71A03F 50%, #71A03F 51%);
background: -ms-linear-gradient(#71A03F,#71A03F 50%, #71A03F 51%);
background: -o-linear-gradient(#71A03F,#71A03F 50%, #71A03F 51%);
background: linear-gradient(#71A03F,#71A03F 50%, #71A03F 51%);
-pie-background: linear-gradient(#71A03F,#71A03F 50%, #71A03F 51%);
border-color: #ADADAD;
}