+ 1
In a form, can an input be nested?
can I add one input into another? I want to create a search area(bar for text) and a search bottom (submit) beside it in the bar..
5 Answers
+ 12
<form>
<!-- Search Bar -->
<input type = "search">
<!-- Submit -->
<input type = "submit">
</form>
Then, use the CSS positioning to move your elements, in this case you have two input tag one beside the other one... because their default value for the display property is "inline" ;)
+ 9
Yes, you can set the Search input as "relative" and the button input as "absolute" to put it inside the Search bar, then use the properties (top, left, right, bottom) to move your elements.
EDIT - I made a DEMO with an easiest solution, take a look here: https://code.sololearn.com/WRO7E7bl2f5i/?ref=app
+ 3
you are implying I position the submit button in the search box, right? and then position it to the desired position?
+ 2
Nesting is not really supported as far as I know.
Though, you can position the button absolutely.
0
awesome work.. thanks