HTML CSS examples for CSS Form:input
CSS: Percentage centering input with padding
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .container {<!-- ww w.ja va 2 s . c o m--> width:81%; margin-left:11%; margin-right:11%; position:relative; outline:2px solid red; } .input { width:100%; padding:11px 16px 11px 31px; -moz-box-sizing:border-box; box-sizing:border-box; } #p1_icon { position:absolute; top:10px; left:8px; } </style> </head> <body> <div class="container"> <a id="p1_icon"></a> <input id="p1" class="input" name="p1" type="password" placeholder="Password"> </div> </body> </html>