我没有添加的IE8奇怪的边界线

时间:2014-01-10 13:41:44

标签: html css internet-explorer-8

enter image description here

相同的HTML,CSS和图像文件,但在IE8中,我有这种奇怪的边界线。

HTML:

<div id="admin_link_div">
    <ul id="vertical_menu">
        <li>
            <a href="/admin/appointment_list">
            <div id="sidebar_left_box">
                Room List
            </div><img id="admin_arrow_img_roomlist" src="/images/arrow_off_icon.gif"></a>
        </li><div id="sidebar_line"></div>
        <li>
            <a href="#">
            <div id="sidebar_left_box">
                User Management
            </div><img id="admin_arrow_img_userlist" src="/images/arrow_off_icon.gif"></a>
            <br>
            <ul>
                <li>
                    <a href="/admin/users">User List</a>
                </li>
                <li>
                    <a href="/admin/users/multi_register">User Register</a>
                </li>
            </ul>
        </li><div id="sidebar_line"></div>
        <li>
            <a href="#">
            <div id="sidebar_left_box">
                Company Mangement
            </div><img id="admin_arrow_img_register" src="/images/arrow_off_icon.gif"></a>
            <br>
            <ul>
                <li>
                    <a href="/admin/companies">Company List</a>
                </li>
                <li>
                    <a href="/admin/companies/new">Company Register</a>
                </li>
            </ul>
        </li><div id="sidebar_line"></div>
        <li>
            <a href="#">
            <div id="sidebar_left_box">
                Service Management
            </div><img id="admin_arrow_img_service" src="/images/arrow_off_icon.gif"></a>
            <br>
            <ul>
                <li>
                    <a href="/admin/barbie_servers">Server Management</a>
                </li>
                <li>
                    <a href="/admin/barbie_management">Barbie Management</a>
                </li>
            </ul>
        </li>
    </ul>
</div>

CSS:

#admin_arrow_img_userlist{
    margin-left: 10px;
    margin-bottom: 2px;
}

有什么好理由???

2 个答案:

答案 0 :(得分:4)

将此添加到您的图片#

outline:none;
border: none; 

因为IE默认为图像设置边框!!

答案 1 :(得分:1)

在图片上试用这个CSS

img
{
 border:0;
 outline:none; 
}

使用边框0 Check link 更合适。