0

I changed the type of Price to number but it has placed the label to the left, how can I correct this?

https://i.sstatic.net/Imga1.png enter image description here

 End Date* (YYYY-MM-DD)  <input type="text" name="eDate"><br>
        Price*       <input type="number" name="price"><br>
2
  • <input type="number" name="price" style="float:left;"> Commented May 1, 2017 at 4:03
  • display:block worked for me, thanks for the help! Commented May 1, 2017 at 4:16

2 Answers 2

1

You can do a couple of things. Some more simple than others.

I know I've fixed this in the past by simply using <br>

soo.. Price*<br> <input type="number" name="price"><br>

Let me know if that doesn't work, I can suggest other solutions, like using width, display: block and floats etc.

Sign up to request clarification or add additional context in comments.

Comments

1

You could go with either floating, expanding the width of the input field or using a label tag to then put that display:block; like for example this:

label{display:block}
<form>
<label for="eDate">End Date* (YYYY-MM-DD)</label>
<input type="text" name="eDate"/>
<label for="price">Price*</label>
<input type="number" name="price"/>
</form>

This would be the way I would handle it, but feel free to ask additional information if you'd require it!

1 Comment

Nice to hear that worked for you, it's also the first thing I would have done to get it fixed to be honest. So do please upvote/mark any of the answers as valid if they helped you ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.