Showing 1 – 2 of 2 replies
Bob

Select2 seems to always bee too small […]

Bob PURCHASED
3 years ago
Hi,

select2 seems to always bee too small compared to other form-controls? Please look at the gender dropdown here (its a select2):

https://imgur.com/V6duNGv
omadmin
omadmin SELLER
3 years ago
can i see the source code ?
Bob
Bob PURCHASED
3 years ago
Its a long page, Ill send that section so you see it:

<div class="row">
<div class="col-md-4">
<small>Firstname</small>
<asp:TextBox ID="txtFirstname" runat="server" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-md-4">
<small>Lastname</small>
<asp:TextBox ID="txtLastname" runat="server" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-md-4 form-group">
<small>Gender</small>
<asp:DropDownList ID="ddSex" runat="server" CssClass="form-control select2" placeholder="Select gender">
<asp:ListItem Value="1">Male</asp:ListItem>
<asp:ListItem Value="0">Female</asp:ListItem>
</asp:DropDownList>

</div>
</div>

... and then the JS:

$(document).ready(function () {
$('.select2').select2();
});

If I add form-control-lg and reload the page, you can see the control"jump" to the larger size, and then it goes back to the small size.

Let me know if you want to full code, but its a large page, much code. I had the same issue on an other page too, I skipped using select2 there but now I really want to use it.