user3402649
user3402649

Reputation: 131

How to insert a label under a input type="text"

I've two textbox in a form and i want to insert two label under both of them, to explain better here there is a little drawing of what I want to do:

(input1)<--space-->(input2)
<label1><--space--><label2>

How can I do this?

edit1:

I'havent't provide further informations, I'm trying to do this just with html and here there's what I've tryied:

<div><input name="city" type="text" value="" /> <input name="state"
 type="text" value=""/></div> <label  style="color:grey;"
 >city</label>&nbsp;<label  style="color:grey;" >state</label></div>

Upvotes: 0

Views: 3115

Answers (1)

Jack hardcastle
Jack hardcastle

Reputation: 2875

https://jsfiddle.net/kmbxawdd/3/

Maybe you're looking for something like that

.input-field {
    display: inline-block;
    position: relative;
}

.input-field label {
    position: absolute;
    top: 25px;
}

Upvotes: 1

Related Questions