Vertical Alignment for Dropdown

I am creating an asp: DropDownList element with custom CSS. I set the height and try to make the text appear in the middle of the element, not at the bottom. Vertically Aligned: Medium doesn't seem to work, and if I add a bottom to push it from below, IE has an ugly gap between the arrow to the right of the drop-down list and the border. This is my CSS for now:

.dropdowndiv
{
    font-size:10pt;
    margin-bottom:2px;
    height:26px;
    width:220px;
    border:1px solid #d5d5d5;
    text-transform:uppercase;
    vertical-align:middle;
}
+3
source share
2 answers

Try the following:

.dropdowndiv
{
    font-size:10pt;
    padding-bottom:4px;
    height:26px;
    width:220px;
    border:1px solid #d5d5d5;
    text-transform:uppercase;
    vertical-align:middle;
}

I changed the margin-bottom 2px setting to the lower part of 4px.

UPDATE:

Looked good at mine, but you can add a gasket in any direction to get it the way you want.

- , :

http://leedumond.com/blog/fixing-asp-net-server-control-rendering-issues-with-tag-mapping/

+1

26px .

0

Source: https://habr.com/ru/post/1731416/


All Articles