0

我有以下由 AJAX 动态加载的 HTML:

        <h5>Contact Information</h5>
    <hr />            
            <div id="formError" style="display:none;margin-top:10px;" class="alert alert-error"></div>
    <div class="form">
        <form class="form-horizontal" id="frmContactInformation" target="<?php echo Uri::create('ucp/updateContactInformation'); ?>" method="post">

            <input type="text" name="ns" id="ns" style="display:none;">
            <input type="hidden" name="<?php echo \Config::get('security.csrf_token_key');?>" id="<?php echo \Config::get('security.csrf_token_key');?>" value="<?php echo \Security::fetch_token();?>" />

            <small><strong>NOTICE</strong> Any address entered here will not be displayed or made publicly available. It will be used for the sole purpose of notifying you of new listings in your area per your notification settings. Should you choose not to enter your address, geolocation based notifications will be unavailable to you. More information is available in our <a href="<?php echo Uri::create('docs/privacy'); ?>">privacy policy</a>.</small><br/><br/>

            <div class="control-group" id="PF-group-addr1">
                <label class="control-label" for="PF-addr1"><strong>Address 1</strong></label>
                <div class="controls">
                    <input type="text" class="input-large" id="PF-addr1" placeholder="Address 1">
                </div>
            </div>
            <div class="control-group" id="PF-group-addr2">
                <label class="control-label" for="PF-addr2"><strong>Address 2</strong></label>
                <div class="controls">
                    <input type="text" class="input-large" id="PF-addr2" placeholder="Address 2">
                </div>
            </div>
                <div class="controls controls-row">
                    <input class="span4" type="text" placeholder=".span4">
                    <input class="span1" type="text" placeholder=".span1">
                </div>                     
            <div class="form-actions">
                <span id="loader" style="display:none;"><?php echo Asset::img('loader.gif'); ?>&nbsp;&nbsp;&nbsp;Processing ... please wait</span>
                <button type="submit" class="btn btn-primary" id="frmSubmit"><strong>Save Changes</strong></button>
            </div>
        </form>
    </div>

在地址 2 字段下,我想要另一行包含三个文本字段 - 城市、州和邮政编码。这些字段中的每一个也应该有一个标签。标签和字段的组合宽度应该等于表单容器的总宽度(我相信它是 span8)。在一些相关的说明中,我拥有的任何其他字段(例如地址 1 或地址 2)都会自动调整大小以水平占用行中的任何剩余空间,尽管设置了各种大小,例如 input-small。对这些问题的任何一个帮助将不胜感激!

http://i.stack.imgur.com/xzLDt.png

4

1 回答 1

0

你的意思是你喜欢这样吗?看我的小提琴:http: //jsfiddle.net/2nY89/50/

<div class="controls controls-row">
    <input class="span1" type="text" placeholder="city">
    <input class="span1" type="text" placeholder="zip">
    <input class="span1" type="text" placeholder="code">
</div> 
于 2013-05-22T03:47:06.583 回答