Web Analytics Made Easy -
StatCounter Vertically align text in select dropdown - CodingForum

Announcement

Collapse
No announcement yet.

Vertically align text in select dropdown

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Vertically align text in select dropdown

    I assigned my form elements (input, select, textarea) a height of 30px and width of 200px, and set the line-height to 30px so the text vertically aligns. The vertical align seems to be working for every element except the select dropdown. The select text aligns to the top left. Anyway I can fix this?

    Code:
    input, select, textarea {
    height:30px;
    line-height:30px;
    width:200px;
    }
    
    <select name="role">
    <option value="admin">Admin</option>
    <option value="user">User</option>
    </select>
    I appreciate any help. This has been an ongoing problem for some time, and I've finally had time to ask for help lol

  • #2
    are you talking about centered like the drop down menus on this page...

    http://www.cssu.com/

    Wish you gave a link to what you're talking about.

    Comment


    • #3
      Yes, and I see that they just added padding. I was hoping this could've been achieved with line-height, but I guess not. :-\

      Comment

      Working...
      X
      😀
      🥰
      🤢
      😎
      😡
      👍
      👎