I have this HTML code:
<div id="welcomename">
<h1>Welcome! What's your name?</h1>
<input type="text" class="form" name="name" placeholder="Your name here!" id="name"/>
<input type="button" onclick="clicked();" value="I'm ready!"/>
</div>
<br>
That works absolutely perfectly, but I for reasons, I need that <br>
inside the div 'welcomename
'. When I do this though, it doesn't work.
Other code:
<div id="hiddenDiv" style="display: none;">
<h1 id="welcomehowareyou">How are you today, ?</h1>
<form id="welcomehowareyou2" method="post">
<select name="mood" onchange="popup(this.options.selectedIndex)">
<option value="" disabled selected>How are you?</option>
<option>I'm doing great, thanks!</option>
<option>I'm fine, but could be better</option>
<option>I feel absolutely terrible today.</option>
<!--<input type="submit" value="Done!"/>-->
</form>
<p></p>
</div>
You are adding the "br" just before the closing of the div and after the input element right? It is because the input element is an inline element.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With