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 896607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:45:19+00:00 2026-05-15T14:45:19+00:00

Say you’ve got two simple table cells next to each other. One contains a

  • 0

Say you’ve got two simple table cells next to each other.
One contains a radio button and text. The other one contains just text.

The radio button’s size is set to 16×16 pixels (don’t ask me why, assume that it just is).
The font size is 12 pixels.

How do you make both labels and the radio button to line up consistently in all major browsers along (or reasonably close to) the vertical middle of the table row?

Sample HTML to get you started:

<style type="text/css">
td {
  font-size: 12px;
  font-family: Verdana;
}

.radio {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin: 0px;
}

.blah {
  text-decoration: line-through;
}
</style>

<table>
  <tr>
    <td>
      <input type="radio" class="radio" />
      <span class="blah">O</span>
    </td>
    <td>
      <span class="blah">O</span>
    </td>
  </tr>
</table>

In my installed versions of IE, Opera, Firefox and Chrome, the above renders like this

The result I’m expecting to see is the one displayed on that image by… …IE? Seriously?

The rest look close enough, but any attempts I made to line up the text made it always look awful in at least 2 of the 4 browsers.

  • 1 1 Answer
  • 1 View
  • 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-15T14:45:20+00:00Added an answer on May 15, 2026 at 2:45 pm

    Googling “vertical-align:middle” found this short explanation by Gavin Kistner, which is useful. I tried out the final suggestion on that page, which seems to render repectably in Chrome, IE, Firefox, Opera, and Safari.

    What I did was add td{ line-height:1.5em } – see the link for explanation.

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

Sidebar

Related Questions

Say I have a Student table, it's got an int ID. I have a
Say, an application properties page with lots of JCheckboxes, JTextfields, JLists and other JComponents.
Say we have two tables in an MS Access db: Service Users: | ID
Say I have a class pet and it is composed of two variables: Class
Say I have two types of objects, Apples and Chainsaws . A user is
Say, we have: <div class=outer> <div class=inner> <span class=text>Hello!</span> </div> </div> The 'outer' div
Say I have two columns of names. All names in the first column are
Say my web app has two spring cron jobs scheduled to run every minute/hour.
Say, the field of Race in my table has values like W,A (white and
Say I've got this array: MyArray(0)=aaa MyArray(1)=bbb MyArray(2)=aaa Is there a .net function which

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.