YogeshChauhan . com

How to vertically align a html radio button to it’s label?

in CSS & HTML on 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;

Most Read

#1 How to check if radio button is checked or not using JavaScript? #2 Solution to “TypeError: ‘x’ is not iterable” in Angular 9 #3 How to add Read More Read Less Button using JavaScript? #4 How to uninstall Cocoapods from the Mac OS? #5 How to Use SQL MAX() Function with Dates? #6 PHP Login System using PDO Part 1: Create User Registration Page

Recently Posted

Jun 16 What are Stored Procedures for SQL Server? Jun 16 What are Class Constants in PHP? Jun 15 A short basic guide on states in React Jun 15 How to define constants in PHP? Jun 15 How to define visibility for a property in PHP? Jun 15 How to use @if and @else in SCSS?

You might also like these

KeyValuePipe in Angular 9AngularHow to create rotating texts using JavaScript and CSS?CSSHow to get previous days or next days in PHP?PHPWhat Is a Graph Database?MiscHow to detect the Blog Page in WordPress?WordPressThe Difference Between isNaN() Method And isNaN() Function In JavaScriptJavaScriptThe difference between isFinite() method and isFinite() function in JavaScriptJavaScript$this Keyword in PHPPHP2 Ways We Can Write Multiple Line Commands in PHPPHPLearn to make a responsive gallery using CSS Grid and without media queriesCSSCONCAT and CONCAT_WS Functions in PostgresPostgresContent Blocks in SCSS (Sass)SCSS