0

How to align input fields separatet from their labels in HTML forms?

I made a form with input tags and I can't align the label for the input field to left and the input field to right separately. Whats the best way to do this or has anyone had the same problem?

27th Jul 2017, 2:45 PM
Drazen Iliskovic
Drazen Iliskovic - avatar
4 Réponses
+ 1
make them display block and float the input field to the right
27th Jul 2017, 2:54 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
0
if it doesn't solves your problem then please show your code
27th Jul 2017, 2:55 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
0
thanks for the answer. i guess that should work, but my skills are not high enough.
27th Jul 2017, 6:49 PM
Drazen Iliskovic
Drazen Iliskovic - avatar
0
here is the code: <!DOCTYPE html> <html> <head> <title>My Blog</title> <link href="https://fonts.googleapis.com/css?family=Handlee" rel="stylesheet"> </head> <body> <!-- Form section start --> <div class="section"> <h1><span>Contact Me</span></h1> <form> <label style="color:blue">Name</label> <input name="name" type="text" style="display:block"/><br/> <label style="color:blue">E-mail</label> <input name="email" type="email" /><br/> <label style="color:blue">Message</label> <textarea name="message" ></textarea> <input type="submit" value="SEND" class="submit" /> </form> </div> <!-- Form section end --> </body> </html>
27th Jul 2017, 6:49 PM
Drazen Iliskovic
Drazen Iliskovic - avatar