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

  • SEARCH
  • Home
  • 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 9182623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:36:13+00:00 2026-06-17T18:36:13+00:00

I want to put a radio button (or any other element) on the left

  • 0

I want to put a radio button (or any other element) on the left of my tables, but have the button be vertically centered. If I new that the tables were all going to be the same size I could use relative positioning. However, I do not know this. This jsfiddle is close to what I need, however, the left div needs be be of the same height (for vertical alignment) and it also needs to reside in the margin. This jsfiddle is closer to what I am looking for, but seems a little hacky and doesn’t allow for tables of different heights. Can I accomplish this using HTML/CSS without javascript?

Here’s the HTML I’m looking at using to accomplish this:

<div class="item">
    <div class="one"><input type="radio" name="group"/></div>
    <div class="two">
    <table>
        <tr><td>Data</td><td>More Data</td></tr>
        <tr><td>another</td><td>row</td></tr>
        <tr><td>of ...</td><td>you guessed it</td></tr>
        <tr><td>just</td><td>more data</td></tr>
    </table>
    </div>
</div>

and CSS:

table {border-collapse:collapse;width:100%;}
td {border:1px solid black;padding:10px;}
.item {margin:10px; padding:10px; background:red;}
.two {background:blue;}

/* customization */
.one {background:yellow;text-align:center;width:20px;display:table-cell;vertical-align:middle;}
.two {margin-left:20px;}

/* hacky */
.one {height:50px;position:relative;top:55px;}
.two {margin-top:-50px;}
  • 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-06-17T18:36:14+00:00Added an answer on June 17, 2026 at 6:36 pm

    Vertical align only works inside table cells or between inline elements. So either use a table with one row and two cells, for .one and .two or use CSS to convert the div’s into table cells:

    .one, .two {display:table-cell;}
    

    Demo (Only tested in firefox, don’t have other browsers installed, hope it works)

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

Sidebar

Related Questions

So i have these radio buttons in XHTML that I want to put into
I want to put the radio button value in the status div. The text
this may be a weird question but I have several radio button groups with
We have a video that we need to show in a button, but we
I want the functionality of a radio button, yet have the option of choosing
I want put a button on android edittextpreference. I create a custom editextpreference: public
hey, hi i want put limit on object creation means a class can have
I want to put two side by side on another (I have three )
I have a seemingly easy task of setting a radio button checked based on
I have 3 radio buttons, when one of them is selected I want to

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.