早教吧作业答案频道 -->其他-->
求div+css高手帮忙解决下,IE8显示不正常,IE6正常!源代码付上/*Nav*/.nav{position:relative;margin:00px0px;background:url(images/navbg.png)no-repeat0-36px;}.navinner{background:url(images/navbg.png)no-repeat100%-72px;}.navl
题目详情
求div+css高手帮忙解决下,IE8显示不正常,IE6正常!源代码付上
/* Nav
*/
.nav {
position:relative;
margin:0 0px 0px;
background:url(images/nav_bg.png) no-repeat 0 -36px;
}
.navinner {
background:url(images/nav_bg.png) no-repeat 100% -72px;
}
.navlist {
height:36px;
line-height:36px;
overflow:hidden;
margin:0 10px;
background:url(images/nav_bg.png) repeat-x 0 0;
}
.nav li {
float:left;
display:inline;
margin:0 0 0 -2px;
padding:0 4px 0 6px;
background:url(images/nav_bg.png) no-repeat 0 -108px;
}
.nav a {
display:block;
width:70px;
text-align:center;
font-size:12px;
}
.nav a:link,.nav a:visited {
color:#fff;
}
.nav a.current,.nav a:hover,.nav a:active {
color:#fff;
font-weight:bold;
background:url(images/nav_bg.png) no-repeat 50% -144px;
}
.subnav {
position:absolute;
top:41px;
left:0;
float:left;
height:27px;
line-height:27px;
white-space:nowrap;
background:url(images/nav_bg.png) no-repeat 0 -180px;
}
* html .subnav {
margin:0 10px 0 -10px; /* IE 6 and below */
}
.subnav p {
padding:0 10px;
background:url(images/nav_bg.png) no-repeat 100% -234px;
}
.subnav p span {
display:block;
background:url(images/nav_bg.png) repeat-x 0 -207px;
}
.subnav p.pointer {
position:absolute;
top:-4px;
left:0;
height:5px;
width:11px;
padding:0;
margin-left:20px;
text-indent:-999em;
background:url(images/nav_bg.png) repeat-x 0 -261px;
}
.subnav a {
display:inline;
padding:0;
font-size:100%;
}
[class~="subnav"] a {
padding:0 3px;
}
.subnav,.subnav a:link,.subnav a:visited {
color:#235e99;
}
.subnav a:hover,.subnav a:active {
color:#235e99;
}
.subnav a:hover,.subnav a:active {
font-weight:normal;
background:none;
border-bottom:2px solid;
}
/* subnav position and pointer position */
#subnav1 { left:70px; }
#subnav2 { left:150px; }
#subnav3 { left:230px; }
#subnav4 { left:460px; }
#subnav5 { left:550px; }
#subnav6 { left:620px; }
#subnav7 { left:630px; }
#subnav1 .pointer,
#subnav2 .pointer,
#subnav3 .pointer,
#subnav4 .pointer { left:30px; }
#subnav5 .pointer { left:auto; right:290px; }
#subnav6 .pointer { left:auto; right:180px; }
#subnav7 .pointer { left:auto; right:70px; }
#subnav1,#subnav2,#subnav3,#subnav4 {
min-width:110px;
}
#subnav5 { min-width:340px; }
#subnav6 { min-width:240px; }
#subnav7 { min-width:130px; }
/* Nav
*/
.nav {
position:relative;
margin:0 0px 0px;
background:url(images/nav_bg.png) no-repeat 0 -36px;
}
.navinner {
background:url(images/nav_bg.png) no-repeat 100% -72px;
}
.navlist {
height:36px;
line-height:36px;
overflow:hidden;
margin:0 10px;
background:url(images/nav_bg.png) repeat-x 0 0;
}
.nav li {
float:left;
display:inline;
margin:0 0 0 -2px;
padding:0 4px 0 6px;
background:url(images/nav_bg.png) no-repeat 0 -108px;
}
.nav a {
display:block;
width:70px;
text-align:center;
font-size:12px;
}
.nav a:link,.nav a:visited {
color:#fff;
}
.nav a.current,.nav a:hover,.nav a:active {
color:#fff;
font-weight:bold;
background:url(images/nav_bg.png) no-repeat 50% -144px;
}
.subnav {
position:absolute;
top:41px;
left:0;
float:left;
height:27px;
line-height:27px;
white-space:nowrap;
background:url(images/nav_bg.png) no-repeat 0 -180px;
}
* html .subnav {
margin:0 10px 0 -10px; /* IE 6 and below */
}
.subnav p {
padding:0 10px;
background:url(images/nav_bg.png) no-repeat 100% -234px;
}
.subnav p span {
display:block;
background:url(images/nav_bg.png) repeat-x 0 -207px;
}
.subnav p.pointer {
position:absolute;
top:-4px;
left:0;
height:5px;
width:11px;
padding:0;
margin-left:20px;
text-indent:-999em;
background:url(images/nav_bg.png) repeat-x 0 -261px;
}
.subnav a {
display:inline;
padding:0;
font-size:100%;
}
[class~="subnav"] a {
padding:0 3px;
}
.subnav,.subnav a:link,.subnav a:visited {
color:#235e99;
}
.subnav a:hover,.subnav a:active {
color:#235e99;
}
.subnav a:hover,.subnav a:active {
font-weight:normal;
background:none;
border-bottom:2px solid;
}
/* subnav position and pointer position */
#subnav1 { left:70px; }
#subnav2 { left:150px; }
#subnav3 { left:230px; }
#subnav4 { left:460px; }
#subnav5 { left:550px; }
#subnav6 { left:620px; }
#subnav7 { left:630px; }
#subnav1 .pointer,
#subnav2 .pointer,
#subnav3 .pointer,
#subnav4 .pointer { left:30px; }
#subnav5 .pointer { left:auto; right:290px; }
#subnav6 .pointer { left:auto; right:180px; }
#subnav7 .pointer { left:auto; right:70px; }
#subnav1,#subnav2,#subnav3,#subnav4 {
min-width:110px;
}
#subnav5 { min-width:340px; }
#subnav6 { min-width:240px; }
#subnav7 { min-width:130px; }
▼优质解答
答案和解析
第一行就不对,有了相对定位,也没有具体地址.一个导航条不用相对定位比较好.
只有li而没有ul,它的其实用来定位还可以.
left:auto;这一句是我一直没有见过的内容.先学习一下.
只有li而没有ul,它的其实用来定位还可以.
left:auto;这一句是我一直没有见过的内容.先学习一下.
看了求div+css高手帮忙解决下...的网友还看了以下:
e^(2πi*(1/6))=(e^2πi)^(1/6)=1^(1/6)=1e^(2πi*(1/6) 2020-06-12 …
求下面函数的解释,看不懂function A = fun(W)[m,n] = size(W); e 2020-06-27 …
英语单词填空1.时间状语:d-r-n-2.场所:b-s-s-o-f-r--e-a-t-e-t3.教 2020-07-14 …
英语翻译1、OldMacdonaldhadafarm.E-I-E-I-O.Andonthatfarm 2020-11-01 …
求证e^i(4π/n)+e^i(8π/n)+...+e^i4(n-1)π/n+e^i(4nπ/n)= 2020-11-01 …
各位帮我解一题九宫图用0到9的数字填进九宫图的A到IABCDEFGHI要求:A+B+C=D+E+F= 2020-11-02 …
如图所示,根据某次实验记录数据画出的电源的U-I图象,下列说法中正确的是()A.纵截距表示的电动势, 2020-11-26 …
2-1设文法G[E]的产生式集为:EàE+T|E-T|TTàT*F|T/F|FFà(E)|i(1)给 2020-11-26 …
英语向高人求教!写几句话.每句开头的第一个字母分别是“L,i,U,F,E,i,F,E,i,w,o,a 2020-12-15 …
如图所示,直线A为电源的U-I图线,直线B和C分别为电阻R1和R2的U-I图线,用该电源分别与R1、 2020-12-18 …