"Property Type Radio Button Group"
Bootstrap 3.2.0 Snippet by renomBago

<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.2.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 ----------> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"> <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,600,700' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="https://dl.dropboxusercontent.com/u/86701580/mypersonalcdn/renda/renda-icon-font.css"> <div class="container"> <h3>Property Type Radio Button Group</h3> <div class="btn-group prop-type-group"id="prop-type-group" data-toggle="buttons"> <label class="btn btn-default prop-type active"> <input type="radio" name="options" id="option2" autocomplete="off" chacked> <span class="icon icon-condo"></span> <span class="prop-type-word">Condo</span> </label> <label class="btn btn-default prop-type"> <input type="radio" name="options" id="option1" autocomplete="off"> <span class="icon icon-family"></span> <span class="prop-type-word">Single<br class="mobile-br"> family</span> </label> <label class="btn btn-default prop-type"> <input type="radio" name="options" id="option2" autocomplete="off"> <span class="icon icon-townhouse"></span> <span class="prop-type-word">Town<br class="mobile-br"> house</span> </label> <label class="btn btn-default prop-type"> <input type="radio" name="options" id="option2" autocomplete="off"> <span class="icon icon-vacationhome"></span> <span class="prop-type-word">Vacation<br class="mobile-br"> home</span> </label> <label class="btn btn-default prop-type"> <input type="radio" name="options" id="option2" autocomplete="off"> <span class="icon icon-vacantland"></span> <span class="prop-type-word">Vacant<br class="mobile-br"> land</span> </label> <label class="btn btn-default prop-type"> <input type="radio" name="options" id="option2" autocomplete="off"> <span class="icon icon-question"></span> <span class="prop-type-word">Other</span> </label> </div> </div>
body { font-family: "open sans", Helvetica, Arial, sans-serif } .btn span.icon { opacity: 1; color: #909090; font-size: 32px; width: 27px; display: block; margin: 0 auto; height: 24px; line-height: 24px; } .btn.active span.icon { opacity: 1; color: #fff; font-size: 32px; width: 27px; display: block; margin: 0 auto; height: 24px; line-height: 24px; } .btn.active { background: #7BB712; } .container { width: 100%; margin: 0 auto; } .prop-type { width: 16.66% } .prop-type-group { width: 100% } .prop-type-word { position: absolute; left: 0; right: 0; top: 120%; width: 100%; margin: 0 auto; font-size: 11px; font-weight: bold; color: #909090; } .mobile-br { display: block; } @media (max-width: 600px) { .prop-type { text-align: left; } .prop-type-word { position: relative; width: 100%; margin: 0 auto; font-size: 13px; top: -5px; left: 8px; bottom: 0; font-weight: bold; } .prop-type.active .prop-type-word { color: #fff; } .btn span.icon { opacity: 1; color: #909090; font-size: 29px; width: 27px; display: inline-block; /* margin: -12px 0px 10px -6px; */ position: relative; top: 3px; } .btn.active span.icon { opacity: 1; color: #fff; font-size: 29px; width: 27px; display: inline-block; /* margin: -12px 0px 10px -6px; */ /* height: 24px; */ /* line-height: 47px; */ } .mobile-br { display: none; } }
$(window).resize(function() { if ($(window).width() <= 600) { $('#prop-type-group').removeClass('btn-group'); $('#prop-type-group').addClass('btn-group-vertical'); } else { $('#prop-type-group').addClass('btn-group'); $('#prop-type-group').removeClass('btn-group-vertical'); } });

Related: See More


Questions / Comments: