hi
I use bootstrap v.4.3.1
I put 2 dropdown list on the page below are codes
<div id="Dsep131">
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
Country
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<asp:Repeater ID="RptCountry" runat="server">
<ItemTemplate>
<li><a target="_blank" class="dropdown-item" id="btnsystem" runat="server" commandargument='<%# Eval("Transfer") %>'><%# Eval("Transfer") %></a></li>
</ItemTemplate>
</asp:Repeater>
</div>
</div>
<div id="Dsep132">
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
City
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<asp:Repeater ID="RptCity" runat="server">
<ItemTemplate>
<li><a target="_blank" class="dropdown-item" id="A1" runat="server" commandargument='<%# Eval("type") %>'><%# Eval("type") %></a></li>
</ItemTemplate>
</asp:Repeater>
</div>
</div>
</div>
</div>
here I put 2 different size for dropdown
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false" style="width: 108px !important;height:30px;">
Country
</button>
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false" style="width: 130px !important;height:39px;vertical-align:central;">
City
</button>
for city width=130px and for country width=108px
now here I should define size for Items in dropdownlist so I should change below code in bootstrap.css:
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width:7rem;/***********size of Items**************/
padding-left:0px;
margin: 0.125rem 0 0 0;
font-size: 12px;
color:white;
text-align: right;
list-style: none;
background-color: #2c2a1e;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 0.25rem;
cursor:pointer;
}
but when I change it both dropdownlists Item's size will change in same but here rptcity is bigger than rptcountry and I can't define different Items size for each dropdown list
I try to change class name to
.dropdown-menu
to
.dropdown-menuCity
and put it for city dropdownlist but when I did it rptcity didn't work
Best Regards
Neda