{"id":29493,"date":"2015-11-03T18:32:06","date_gmt":"2015-11-03T13:02:06","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=29493"},"modified":"2015-11-04T10:39:05","modified_gmt":"2015-11-04T05:09:05","slug":"how-to-create-stylish-select-boxradio-buttoncheckbox","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/how-to-create-stylish-select-boxradio-buttoncheckbox\/","title":{"rendered":"How to create Stylish Select-box,Radio button,Checkbox"},"content":{"rendered":"<h3 style=\"font-size:26px!important;margin:20px 0!important\">Stylish Select-box<\/h3>\n<p><strong>HTML<\/strong><\/p>\n<p>[java]<br \/>\n&lt;select class=&quot;selectBox&quot;&gt;<br \/>\n&lt;option&gt;Select&lt;\/option&gt;<br \/>\n&lt;option&gt;New Delhi&lt;\/option&gt;<br \/>\n&lt;option&gt;Mumbai&lt;\/option&gt;<br \/>\n&lt;\/select&gt;<br \/>\n[\/java]<\/p>\n<p><strong>CSS<\/strong><\/p>\n<p>[java]<br \/>\n.selectBox{<br \/>\nappearance: none;-webkite-appearance: none;-moz-appearance: none;-o-appearance: none;-ms-appearance: none;<br \/>\nbackground: #f5f5f5 url(&#8216;image-path&#8217;) no-repeat right center;<br \/>\nborder: 1px solid #eeeeee;<br \/>\nwidth:300px;<br \/>\nheight:40;<br \/>\npadding:10px;<br \/>\n}<br \/>\n[\/java]<\/p>\n<h3 style=\"font-size:26px!important;margin:20px 0!important\">Stylish Radio button<\/h3>\n<p><strong>HTML<\/strong><\/p>\n<p>[java]<br \/>\n&lt;input type=&quot;radio&quot; value=&quot;&quot; class=&quot;radioBtn&quot;\/&gt;&lt;label&gt;&lt;\/label&gt;<br \/>\n[\/java]<\/p>\n<p><strong>CSS<\/strong><\/p>\n<p>[java]<br \/>\n.radioBtn {<br \/>\n   vertical-align: middle;<br \/>\n   width: 15px;<br \/>\n   height: 15px;<br \/>\n   opacity: 0;<br \/>\n}<\/p>\n<p> .radioBtn + label:before {<br \/>\n   content: &quot;&quot;;<br \/>\n   display: inline-block;<br \/>\n   margin: 0 0 0 -20px;<br \/>\n   vertical-align: middle;<br \/>\n   height: 15px;<br \/>\n   width: 15px;<br \/>\n   background: url(&#8216;image-path&#8217;) no-repeat left top;<br \/>\n}<\/p>\n<p>.radioBtn:checked + label:before {<br \/>\n   background-position: left bottom;<br \/>\n}<br \/>\n[\/java]<\/p>\n<h3 style=\"font-size:26px!important;margin:20px 0!important\">Stylish Checkbox<\/h3>\n<p><strong>HTML<\/strong><\/p>\n<p>[java]<br \/>\n&lt;input type=&quot;checkbox&quot; value=&quot;&quot; class=&quot;checkboxBtn&quot;\/&gt;&lt;label&gt;&lt;\/label&gt;<br \/>\n[\/java]<\/p>\n<p><strong>CSS<\/strong><\/p>\n<p>[java]<br \/>\n.checkboxBtn {<br \/>\n   vertical-align: middle;<br \/>\n   width: 15px;<br \/>\n   height: 15px;<br \/>\n   opacity: 0;<br \/>\n}<\/p>\n<p>.checkboxBtn + label:before {<br \/>\n   content: &quot;&quot;;<br \/>\n   display: inline-block;<br \/>\n   margin: 0 0 0 -20px;<br \/>\n   vertical-align: middle;<br \/>\n   height: 15px;<br \/>\n   width: 15px;<br \/>\n   background: url(&#8216;image-path&#8217;) no-repeat left top;<br \/>\n}<\/p>\n<p>.checkboxBtn:checked + label:before {<br \/>\n   background-position: left bottom;<br \/>\n}<br \/>\n[\/java]<\/p>\n<p><strong>Note :-As per requirements You Can change background,border,width,height.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Stylish Select-box HTML [java] &lt;select class=&quot;selectBox&quot;&gt; &lt;option&gt;Select&lt;\/option&gt; &lt;option&gt;New Delhi&lt;\/option&gt; &lt;option&gt;Mumbai&lt;\/option&gt; &lt;\/select&gt; [\/java] CSS [java] .selectBox{ appearance: none;-webkite-appearance: none;-moz-appearance: none;-o-appearance: none;-ms-appearance: none; background: #f5f5f5 url(&#8216;image-path&#8217;) no-repeat right center; border: 1px solid #eeeeee; width:300px; height:40; padding:10px; } [\/java] Stylish Radio button HTML [java] &lt;input type=&quot;radio&quot; value=&quot;&quot; class=&quot;radioBtn&quot;\/&gt;&lt;label&gt;&lt;\/label&gt; [\/java] CSS [java] .radioBtn { vertical-align: middle; width: 15px; height: [&hellip;]<\/p>\n","protected":false},"author":228,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":0},"categories":[1],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/29493"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/228"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=29493"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/29493\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=29493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=29493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=29493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}