Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4256832
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:24:32+00:00 2026-05-21T05:24:32+00:00

I have the following html: A div, which contains a label and a drop

  • 0

I have the following html:

A div, which contains a label and a drop down list (select) for that label. Putting a vertical-align:center on both the label and dropdown, the result is that the label is centered, but the dropdown is not centered. What I consider centered is “equal spacing above and below the dropdown”. What IE apparently considers centered is aligning the bottom of the drop down list with the bottom of the label, which, unfortunately, does not look very good. How can I fix this?

edit: It isn’t urgent since position:relative; easily fixed the issue but using position:relative; annoys me and shouldn’t be necessary.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T05:24:32+00:00Added an answer on May 21, 2026 at 5:24 am

    You are basically missusing vertical-align property. It will work as you intended only in a table cell. Not on a div. Also it is vertical-align:middle; not center.

    vertical-align:middle: Aligns the vertical midpoint of the element with
    the baseline of the parent element
    plus half the x-height of the parent.

    I think this article explains it clearly why: http://www.ibloomstudios.com/articles/vertical-align_misuse/

    The key is baseline here as this is the point towards which the element get’s aligned.

    Sample: http://jsfiddle.net/easwee/kabBF/7/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the following HTML page, I have a div, which contains two spans (
I have an HTML file which contains the following line: <div><img src=img1.gif><br>My Text</div> I'm
I have the following HTML: <div style=30px;> <table width=100%;> <tr> <td> <SELECT name=guidelinks> <OPTION
I have the following html markup: <div class=wrap_select> <span class=select id=selectdateRange>Today, 25 March, Sun</span>
I have following html codes <div align=center style=width:1000px;border:1px solid green;> <div style=border:1px solid red;float:left;
I have a login page using jQuery Mobile which contains the following code: <div
I have following HTML <div id=finalTree> <ul> <li class=last style=display: list-item;> <a id=DataSheets href=#>Data
I have 2 dropdowns on my HTML page : The first drop down contains
I have the following code which moves a DIV block 20px down on mouseover:
I have the following HTML markup: <div class=drag a></div> <div class=drop a></div> I also

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.