开发者

Can I make this work in IE?

开发者 https://www.devze.com 2023-02-04 07:11 出处:网络
Hi I just built a CSS menu with submenu It seems to work perfectly fine in Firefox..However there seems to be a problem with IE..It just does not works. Can someone tell me work around ? Heres CSS

Hi I just built a CSS menu with submenu It seems to work perfectly fine in Firefox..However there seems to be a problem with IE..It just does not works. Can someone tell me work around ? Heres CSS

body
{
margin:0px;
padding:0px;
font-family:calibri;
font-size:16px;
}

#navigation
{
width:100%;
height:40px;
background-color:#999;
}

#navigation ul
{
margin:0px;
padding:0px;
}

#navigation ul li
{
display:inline;
height:28px;
width:15.7%;
float:left;
list-style:none;
border-style:solid;
border-width:1px;
border-color:#c3c3c3;
padding:5px 5px 5px 5px;
margin-left:0px 0px 0px 0px;
position:relative;
text-align:center;
}

#navigation ul li:hover
{
color:#fff;
background-color:red;
}

#navigation li a
{
color:#fff;
text-decoration:none;
}

#navigation开发者_StackOverflow中文版 li a:hover
{
color:black;
text-decoration:underline;
}

#navigation li ul
{
margin:0px;
padding:0px;
display:none;
position:absolute;
Right:0px;
top:39px;
padding:0px 0px 0px 0px;
}

#navigation li:hover ul
{
display:block;
width:160px;
 border-style:solid;
 border-width:0px;
 border-color:red;
 background-color:none;
 padding-right:4px;
}

#navigation li li
{
list-style:none;
display:list-item;
 border-style:solid;
 border-width:0px;
 border-color:blue;
 background-color:yellow;
 width:100%;
 margin: 2px 2px 2px 2px;
 padding:0px 0px 0px 0px;
 text-align:left;
}

#navigation li li:hover
{
list-style:none;
display:list-item;
border-style:solid;
border-width:0px;
border-color:none;
background-color:none;
width:100%;
text-align:left;
}

#sbmenu
{
border-style:solid;
border-width:0px;
border-color:gray;
background-color:#b1b1b1;
width:97%;
height:90%;
margin:0px 0px 0px 0px;
padding:0px 0px 0px 5px;
text-align:left;
}

#sbmenu:hover
{
background-color:#c3c3c3;
}


maybe adding this on first lines on html document will help :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

or transitional ( also must be added on first line of html document )

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
0

精彩评论

暂无评论...
验证码 换一张
取 消