Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I m making a web application in visual studio.
I want to keep the width of all dropdownlist as same. i have 3 dropdown list and width of all are different. i have to keep them same using percentage and not pixel
thanks
Posted

1 solution

By using css.
CSS
.ddl{
    width: 20%;
    height:10%; 
/*width - height whatever you want*/
}

ASP.NET
<asp:dropdownlist id="ddl1" runat="server" cssclass="ddl" xmlns:asp="#unknown">
</asp:dropdownlist>
<asp:dropdownlist id="ddl2" runat="server" cssclass="ddl" xmlns:asp="#unknown">
</asp:dropdownlist>
<asp:dropdownlist id="ddl3" runat="server" cssclass="ddl" xmlns:asp="#unknown">
</asp:dropdownlist>


-KR
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900