HTML form label text moving when entered many characters - html

The label text on my custom HTML form is moving when entering too many characters. I have attached a picture for visual reference. If I were to add more characters the label text would completly dissapear. I would really appreciate if you can help me out here. Picture of form
Here is an example of what my labels code look like:
<label>
Last Name
<span class="l-name">
<input
type="text"
id="lastname"
name="lastname"
placeholder="Last Name"
required=""
/>
</span>
</label> ```

Fixed the issue, moving the label description outside the field did it.

Related

how can I include an image or icon a placeholder alongside with text on a input form

I'm struggling to include an icon as a placeholder in an input form alongside a text
<input type="email" placeholder=" src="image source" your email">
I dont believe its possible to put an image inside but its possible to put a unicode in it. Do you mean like this??
<input type="email" placeholder=" &#9993 your email" >

how do i add permanent place holder inside input filed

i need to add font-icon inside input field so i used this method
<input type="text" name="your name" placeholder=" YOUR NAME" style="font-family:Flaticon" class="restrict">
as you see placeholder=" YOUR NAME" this  display font-icon but my problem is when user types some text place holder disapper so i need font icon to be placed permanent inside input field like <lable>
can someone help me
You can't. What do you expect it to look like? placeholder disappears by design.
If you want to prefix an icon in front of your input field, put them together in a container, give this container the needed style and put there your icon and your input-tag. That's the way, how bootstrap your problem solves.
Shortened example:
<div class="input-group">
<div class="input-group-addon">$</div>
<input type="text" class="form-control" id="exampleInputAmount" placeholder="Amount">
</div>
Of course, you need CSS.

How to align input fields in forms without using so that they start at the same vertical position regardless of the size of the label?

I am new to html. This is a very simple question. I am dealing with forms. I want all the input text fields to start at the same x-axis point regardless of the size of the label. I want the labels to be left aligned and all the text fields to start at the same x-axis point.I don't want to use tables or "&nbsp". Is there a simple solution or Should I use separate divisions for labels and input fields? I don't mind using css but I prefer it to be simple.
<form>
<label>Name</label>
<input type="text" name="n1"><br>
<label>Phone No.</label>
<input type="text" name="p1">
</form>
I want "n1" and "p1" to start at the same x-axis point.
Add this style to your page:
label{
display:inline-block;
min-width:80px
}
Check here Fiddle
You can use paragraph tags for every input element.
<p><input type="text" name="your name"></p>
<p><input type="email" name="your email"></p>

Can enter text in input text fields?

Having a slight issue with the input[type="text"] fields. I cannot enter any text into the text fields neither can I highlight the text field with the cursor, the cursor does not even appear or flash at all. Its as if the input field is disabled.
<input type="text" name="name" placeholder="placeholder text here" />
Help will be great. Thanks in Advance
instead of placeholder make it as value
<input type="text" name="name" value="placeholder text" />

remove text box drop down suggestions

I have a text input where people type and send text. I don't want the text box to have a drop down box with suggestions based on previous inputs. How do i remove this textbox drop down box? (I know its gonna be a simple 1 line of code but I can't find it :P)
Try this attribute in your input tag:
autocomplete="off"
This should do it
<input type="text" autocomplete="off" />
you can try this
<input type="text" autocomplete="new-password" />