I am using this code for a custom calculator on my site, but when it's live, there appears to be a large padded area between part I of the form and Part II of the form.
It's pretty simple code. I just can't get past the wide-open unused area the form uses.
<div align="center"><p>How many miles from Petersburg, Virginia are you?</p>
<form oninput="x.value= Math.round(a.value*b.value)+(c.value*d.value)">
<input type="number" id="a" value="" maxlength="3">
<input type="hidden" id="b" value="0.60"><br>
<p>And, how many pages require a notary seal?</p><br>
<input type="number" id="c" value="" maxlength="3">
<input type="hidden" id="d" value="3"><br>
<i>Your quote:</i><font color="green"><big>$<output name="x" for="a b c d"></big></font></output></form></form>
</div>
答案 0 :(得分:1)
此行:
<%= file_input f, :photo, class: "form-control" %>
您有一个<p>And, how many pages require a notary seal?</p><br>
和一个<p>
。 <br>
标签的顶部和底部为空白,是一个块元素,因此覆盖了整个宽度。 <p>
通过强制换行来增加额外的空间。删除<br>
。