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?
4 odpowiedzi
+ 1
make them display block and float the input field to the right
0
if it doesn't solves your problem then please show your code
0
thanks for the answer. i guess that should work, but my skills are not high enough.
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>