Javascript 在IE 7中,Child div不占全部宽度

Javascript 在IE 7中,Child div不占全部宽度,javascript,jquery,html,asp.net,dhtml,Javascript,Jquery,Html,Asp.net,Dhtml,我在一个页面中有这个结构 <div style="float: right"> <div> <label> Test type</label> <select id="selTest1"> </select> </div> <div>

我在一个页面中有这个结构

    <div style="float: right">
        <div>
            <label>
                Test type</label>
            <select id="selTest1">
            </select>
        </div>
        <div>
            <label>
                Test category</label>
            <select id="selTestCat">
                <option value="0">--Please Select--</option>
            </select>
        </div>


        <div style="text-align: right; width: 100%;">
            <a style="margin-right:0px;" href="Nothing.aspx" class="button" id="btnTest">Select</a>
        </div>

        <div>
            <input id="hdTest1" runat="server" type="hidden" />
            <input id="hdnTest2" runat="server" type="hidden" />
        </div>
    </div>

测试类型
测试类别
--请选择--
IE7中的所有内容都正确对齐 除了


在IE8和其他浏览器中,这个div也占据整个宽度,并且按钮向右对齐。
但在IE7中,按钮的div仅取按钮的宽度。

尝试将display:inline应用到按钮。我已经在下面为您完成了,看看是否有效:

 <div style="float: right">
        <div>
            <label>
                Test type</label>
            <select id="selTest1">
            </select>
        </div>
        <div>
            <label>
                Test category</label>
            <select id="selTestCat">
                <option value="0">--Please Select--</option>
            </select>
        </div>


        <div style="text-align: right; width: 100%;">
            <a style="margin-right:0px; display:inline;" href="Nothing.aspx" class="button" id="btnTest">Select</a>
        </div>

        <div>
            <input id="hdTest1" runat="server" type="hidden" />
            <input id="hdnTest2" runat="server" type="hidden" />
        </div>
    </div>

测试类型
测试类别
--请选择--
 <div style="float: right">
        <div>
            <label>
                Test type</label>
            <select id="selTest1">
            </select>
        </div>
        <div>
            <label>
                Test category</label>
            <select id="selTestCat">
                <option value="0">--Please Select--</option>
            </select>
        </div>


        <div style="text-align: right; width: 100%;">
            <a style="margin-right:0px; display:inline;" href="Nothing.aspx" class="button" id="btnTest">Select</a>
        </div>

        <div>
            <input id="hdTest1" runat="server" type="hidden" />
            <input id="hdnTest2" runat="server" type="hidden" />
        </div>
    </div>