0

My asp.net checkbox ends up with a span around it. Setting the width and height to 30px doesn't change the checkbox in both full browser or collapsed into smart phone size. The checkbox is in a navbar. Everything works and collapses, I just can't change the style of the checkbox.

Starts out here:

<li>
    <asp:CheckBox ID="chkInflate" Style="width: 30px !important; height: 30px !important;
        margin-bottom: 5px;" class="form-control" EnableViewState="True" AutoPostBack="True"
        BackColor="#f6f2dc" ForeColor="Black" runat="Server" ToolTip="Check/Uncheck the box to have all the names expand with more info on this web page. Or go over and click on an event name to pop up a whole bunch of information.">
    </asp:CheckBox></li>
<li>

Inspect HTML in Chrome shows the size is assigned to the span. Not sure how to make the "chkInflate" hold the new size.

<span  class="form-control" style="color:Black;background-color:#F6F2DC;width: 30px !important;height: 30px !important;margin-bottom: 5px;"><input id="chkInflate" type="checkbox" name="chkInflate" onclick="javascript:setTimeout('__doPostBack(\'chkInflate\',\'\')', 0)"></span>

<input id="chkInflate" type="checkbox" name="chkInflate" onclick="javascript:setTimeout('__doPostBack(\'chkInflate\',\'\')', 0)">

</span>

My desire is a larger checkbox on both un-collapsed and collapsed display

JustJohn
  • 1,362
  • 2
  • 22
  • 44
  • See http://stackoverflow.com/questions/4148499/how-to-style-checkbox-using-css – VDWWD Aug 18 '16 at 19:02
  • @ManishGoswami, no that doesn't work. I'm trying to go "inside" not outside the checkbox even farther. Currelty, it is styling the outside span of the checkbox. – JustJohn Aug 18 '16 at 22:55
  • @VDWWD, I doubt this will change the size since it's using a Sprite with images of checkboxes. The problem as shown in my question is that the asp.net adds a span around the checkbox input and assigns the style to the span, not the checkbox. I did find something that looks promising by someone who understands what asp.net is doing. I can't wait to try it when I get home tonight. Supposedly, I need to target span.CheckBox input {} http://stackoverflow.com/questions/112883/change-style-look-of-aspcheckbox-using-css – JustJohn Aug 18 '16 at 23:01
  • In the question there is a link to http://jsfiddle.net/0qjozqtc/1/. This example does not use sprites but a font. You can make the font as big as you want. – VDWWD Aug 19 '16 at 07:55