Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html ie7中的设计问题_Html_Css_Internet Explorer 7_Html Lists - Fatal编程技术网

Html ie7中的设计问题

Html ie7中的设计问题,html,css,internet-explorer-7,html-lists,Html,Css,Internet Explorer 7,Html Lists,你好,这是我的HTML <div style="width:220px;float:left;" id="radio_text"> <ul style="width:20px;float:left;display:block;"> <li style="list-style:none;line-height:13px;height:13px;float:left;"><input type="radio" name="radio_

你好,这是我的HTML

<div style="width:220px;float:left;" id="radio_text">
    <ul style="width:20px;float:left;display:block;">
        <li style="list-style:none;line-height:13px;height:13px;float:left;"><input type="radio" name="radio_flag" checked="true" /></li>
        <li style="list-style:none;line-height:13px;height:13px;float:left;"><input type="radio" name="radio_flag" /></li>
        <li style="list-style:none;line-height:13px;height:13px;float:left;"><input type="radio" name="radio_flag" /></li>
    </ul>
    <ul style="width:200px;float:left;">
        <li style="list-style:none;line-height:13px;height:13px;width: 200px;float:left;">Show All</li>
        <li style="list-style:none;line-height:13px;height:13px;width: 200px;float:left;">Show Only Members</li>
        <li style="list-style:none;line-height:13px;height:13px;width: 200px;float:left;">Show Only Accepted Contacts</li>
    </ul>
</div>
以及我的输出

请帮助我在IE 7中正确显示它


谢谢

我不知道您正在编程的确切情况,您为什么不将HTML更改为:

<div style="width:220px;float:left;" id="radio_text">
    <ul style="float:left;display:block;">
        <li style="list-style:none;line-height:13px;height:13px;">
            <input type="radio" name="radio_flag" checked="true" />
            <span class="radio-text">Show All</span>
        </li>
        <li style="list-style:none;line-height:13px;height:13px;">
            <input type="radio" name="radio_flag" />
            <span class="radio-text">Show Only Members</span>
        </li>
        <li style="list-style:none;line-height:13px;height:13px;">
            <input type="radio" name="radio_flag" />
            <span class="radio-text">Show Only Accepted Contacts</span>
        </li>
    </ul>
</div>

  • 全部展示
  • 仅显示成员
  • 仅显示已接受的联系人
这样,文本将自动显示在单选按钮旁边。您还可以在单选按钮和跨距周围包装一个标记,以便在用户单击文本时检查单选按钮

<label><input type="radio" name="rbtn"/><span>text</span></label>
text

我同意,最好将所有样式属性都放在外部样式表中。

您应该将内联样式移到外部样式表中。在IE7中看起来不错。为什么要将单选按钮从标签中分离出来?嗯,你发布的代码在IE7中看起来不错,除非你没有粘贴一些css。也同意@Kyle和@jswolf19
<label><input type="radio" name="rbtn"/><span>text</span></label>