There is such code:
<form action="" method="post"> Логин:<input type="text"> Пароль:<input type="password"> <input type="submit" value="Ok"> </form> How to make everything smooth? And what are the ways to align?
Логин: Пароль: The easiest way, without using styles: use a table. Source: https://ru.stackoverflow.com/questions/520057/2 answers
div.field { padding-bottom: 5px; } div.field label { display: block; float: left; width: 70px; height: 15px; }
<form action="" method="post"> <div class="field"> <label>Логин:</label> <input type="text" name="login" /> </div> <div class="field"> <label>Пароль:</label> <input type="password" name="password" /> </div> <div class="field"> <label></label> <input type="submit" value="Ok"> </div> </form>
<form action="" method="post"> <table> <tbody> <tr> <td>Логин:</td> <td> <input type="text"> </td> </tr> <tr> <td>Пароль:</td> <td> <input type="password"> </td> </tr> <tr> <td colspan="2"> <input type="submit" value="Ok"> </td> </tr> </tbody> </table> </form>
All Articles