Anyone knows how to align table in the middle vertically? And how to set a characters limit on password form? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Anyone knows how to align table in the middle vertically? And how to set a characters limit on password form?

28th Dec 2016, 9:54 AM
Kartika
2 Answers
+ 4
You can't really verticall align it just by using HTML, you will have to use CSS for that. You will use this to vertical align it: table { position: relative; top: 50%; transform: translateY(-50%); } You can put that code in the <head> section between <style> tags or in a separate .css file and refference it in your <head> by using <link rel="stylesheet" type="text/css" href="mystyle.css"> And for the password, in HTML5 you have the "maxlength" attribute for example, if you want to limit the password textbox to 10 characters you would use: <input type="password" name="password" maxlength="10">
28th Dec 2016, 10:21 AM
Sam White
Sam White - avatar
0
@SamWhite it explains a lot. Thank you for answering
28th Dec 2016, 10:29 AM
Kartika