asp.net - setting width of select box of asp dropdownlist -
i have gone through similar questions (answers) asked before. not have need. need width of drop down constant time. when drops down & items wider width. wider items should displayed tooltip. how do this? , deal select element? why every post have answers in terms of "select". using asp dropdown. how use select it? anyway, here's css ddl:
.ddl2 { margin-top: 10px; margin-bottom: 10px; border-style: solid; border-width: thin; border-color: gray; height: 20px; max-width: 150px; }
this works (only in firefox) when nothing selected. ddl drops, selectbox takes width of widest element.
edit:
try { dataset dscountry = objbindddl.binddropdownlisttoacountry(); ddlcountry.datasource = dscountry.tables["acountry"]; ddlcountry.datatextfield = "countryname"; ddlcountry.datavaluefield = "id"; ddlcountry.databind(); ddlcountry.items.insert(0, new listitem("please select country", "")); }
Comments
Post a Comment