div中的Rails形式(有边框)渲染div(和外边框)

时间:2015-05-13 18:03:15

标签: html css ruby-on-rails

代码:

    <div class="start-page-content-inner-box" style="border-width: 2px; border-style: solid; border-color: black">
        <div id="step-1">
            <h1 class="invite-h1">You've been invited</h1>
            <div class="col-xs-12 col-sm-8 col-sm-offset-2 zero-padding">
                <p class="invite-text">Be one of the few to enjoy our personal chef service</p>

                <%= form_tag do %>
                    <div class="form-group">
                        <%= number_field_tag :zipcode, nil, placeholder: "Confirm your zipcode" %>
                    </div>
                    <div class="form-group">
                        <%= submit_tag "See the invite", class: "btn", id: "start-button" %>
                    </div>
                <% end %>

            </div>
        </div>
    </div>

呈现HTML:

    <div class="start-page-content-inner-box">
        <div id="step-1">
            <h1 class="invite-h1">You've been invited</h1>
            <div class="col-xs-12 col-sm-8 col-sm-offset-2 zero-padding">
                <p class="invite-text">Be one of the few to enjoy our personal chef service</p>

                <form accept-charset="UTF-8" action="/" method="post"><div style="display:none"><input name="utf8" type="hidden" value="✓"><input name="authenticity_token" type="hidden" value="32U1UoucO8DM8XhSXx1GrZ1uHtaQ9LeqhrXkYokF8L8="></div>
                    <div class="form-group">
                        <input id="zipcode" name="zipcode" placeholder="Confirm your zipcode" type="number">
                    </div>
                    <div class="form-group">
                        <input class="btn" id="start-button" name="commit" type="submit" value="See the invite">
                    </div>
                </form>
            </div>
        </div>
    </div>

所以表单肯定在start-page-content-inner-box里面有边框样式,但为什么输出如下?关于我不知道的形式的一些特殊规则? enter image description here

0 个答案:

没有答案