How to vertically align a html radio button to it’s label?
October 18, 2020


This worked for me.

There are other solutions available fir e.g. using display:table-cell, adjust label or adjust label and radio button both. Use whichever works for you.

input[type="radio"] {
  margin-top: -1px;

Leave a Reply

Most Read

#1 How to check if radio button is checked or not using JavaScript? #2 How to set opacity or transparency using CSS? #3 Pagination in CSS with multiple examples #4 How to make HTML form interactive and using CSS? #5 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #6 How to uninstall Cocoapods from the Mac OS?

Recently Posted

Mar 3 How to embed YouTube or other video links in WordPress? Mar 3 How to change the Login Logo in WordPress? Mar 3 substring() Method in JavaScript Mar 3 Window setInterval() Method in JavaScript Mar 2 How to zoom an element on hover using CSS? Mar 2 the box-sizing property in CSS

You might also like these

Create a responsive pricing table using simple HTML and CSSCSSHow to create a CSS full page background image?CSS2 Ways we can create an Array in JavaScriptJavaScriptObject destructuring in JavaScript: Unpacking fields from objects passed as function parameterJavaScriptReverse a String in JavaScriptJavaScriptLIMIT and OFFSET in PostgresPostgresHow to Write Complex Search Queries in SQL?SQL/MySQLFull and Partial ROLLUP in Postgresql with ExamplesPostgresMIN, MAX, COUNT, AVG and SUM in SQLSQL/MySQLWhy does MOV matter in IT or any kind of projects?MiscWhat is the best way to add JavaScript Code into HTML?HTMLJavaScript String Properties and MethodsJavaScript