IE7溢出:自动bug

时间:2012-07-29 12:13:52

标签: internet-explorer-7 overflow

有没有人知道IE7中的问题在哪里http://jsfiddle.net/jDNFU/?我已经尝试过我所能做的一切。

1 个答案:

答案 0 :(得分:0)

你不能用这样的东西吗?你想做什么?它看起来像什么?

<ul id="mytest">
    <li><input type="text" value="" name="test1" /></li>
    <li><input type="text" value="" name="test2" /></li>
    <li><input type="text" value="" name="test3" /></li>
    <li><input type="text" value="" name="test4" /></li>
    <li><input type="text" value="" name="test5" /></li>
    <li><input type="text" value="" name="test6" /></li>
</ul>

#mytest {list-style:none; width:254px; max-height:328px; overflow-y:auto; display:block;}
#mytest li {position:relative; display:inline; zoom:1; height:25px;}
#mytest input {position:absolute;}

修改 既然你自己修理了所有这些,那么我就是这样做的。因为您不需要调整输入的大小,所以您只能拍摄完整的背景图像,不是吗?

.clr { clear: both; }
#myform { width: 800px; }
#myform fieldset { display: block; float: left; margin: 0; padding: 0; border: medium none; }
#myform input.txt { display: block; width: 200px; border: medium none; background: transparent url('bg_input.jpg') no-repeat scroll 0 0; height: 30px; text-indent: 2px; }
#myform label { float: left; width: 120px; height: 30px; }
#myform textarea { display: block; border: medium none; height: 180px; background: transparent url('bg_textarea_large.jpg') no-repeat scroll 0 0 !important; resize: none; }
#myform .large { width: 378px; background: transparent url('bg_input_large.jpg') no-repeat scroll 0 0; }
#myform .button {  }

#myform fieldset.addfriends { width: 300px; }
#myform fieldset.personal { width: 500px; }

    <form id="myform">
        <fieldset class="addfriends">
            <p>Enter at least 3 email addresses of your friends</p>
            <input type="text" class="txt" />
            <br />
            <input type="text" class="txt" />
            <br />
            <input type="text" class="txt" />
        </fieldset>
        <fieldset class="personal">
            <label for="name">Your name:</label><input type="text" id="name" class="txt" />
            <br />
            <label for="email">Your e-mail:</label><input type="text" id="email" class="txt" />
            <br />
            <label for="subject">Subject:</label><input type="text" id="subject" class="txt large" value="You'll love it!" />
            <br />
            <label for="message">Message:</label><textarea id="message" class="large"></textarea>
            <br />
            <input type="submit" class="button" value="Send" />
        </fieldset>
        <div class="clr"></div>
    </form>