为什么就一个单独的div样式应用部了,其他的都没问题,急_html/css_WEB-ITnose

nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
为什么就一个单独的div样式应用部了,其他的都没问题,急_html/css_WEB-ITnose
    
网上购物享当当
           
        

登录后复制

@charset"utf-8";body{ padding:0; margin:0; font-size:12px;line-height:22px; }ul,li{padding:0; margin:0;}ul{list-style-type:none;}.wrap{width:960px; margin:0 auto;}#welcome ul{padding-left:430px; }#welcome ul li{float:left;}#welcome ul li a { color:#000000; text-decoration:none; margin:0 5px; }#welcome ul li.login a { color:#1a66b3; }#welcome ul li.shopping{background:url(../images/shopping.gif) left center no-repeat; padding-left:20px;}#welcome ul li em { display:block; float:left; height:7px; margin:6px 0; border-right:1px solid #bcbcbc; overflow:hidden; }#welcome ul li a.arrow{ background:url(../images/arrow.gif) right center  no-repeat; padding-right:12px;}#mainNav #logo{ float:left; width:160px; text-align:center}#mainNav .large{float:left; width:450px;}#mainNav .large .organge{color:#ff6600; }#mainNav .large ul li{float:left; margin:0 2px; line-height:30px; font-size:14px; text-align:center; font-weight:bold; }#mainNav .large ul li a{display:block; background:url(../images/nav_bg.gif); width:77px; text-decoration:none; color:#333;}#mainNav .large ul li.home a{background:url(../images/nav_home.gif); width:59px;color:#fff; }#mainNav .side { float:right; margin-top:30px; }#mainNav .side ul li em { display:block; float:left; height:7px; margin:6px 0; border-right:1px solid #bcbcbc; overflow:hidden; }#mainNav .side ul li a { margin:0 5px; color:#333; text-decoration:none; }#mainNav .side ul li a.arrow { background:url(../images/arrow.gif) right center no-repeat; padding-right:12px; }#navbar { clear:both; background:#fc883b; height:30px; }#navbar ul li { float:left; line-height:30px; }#navbar ul li a { color:#fff; text-decoration:none; padding:0 9px; }#navbar ul li em { display:block; float:left; border-left:#dc6b04; border-right:1px solid #fba455; height:5px; margin:12px 0; overflow:hidden;

登录后复制
#mainNav .side下的样式应用不了,这是我复制别人的代码,别人的代码运行起来没问题,自己复制过来一模一样的为什么就单独一个div样式应用不了呢?

回复讨论(解决方案)

补充:是同一台机器

你的页面结构复制乱了,如下浏览器直接查看,side那个div应该属于#mainNav 下的

nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">@charset"utf-8";body{ padding:0; margin:0; font-size:12px;line-height:22px; }ul,li{padding:0; margin:0;}ul{list-style-type:none;}.wrap{width:960px; margin:0 auto;}#welcome ul{padding-left:430px; }#welcome ul li{float:left;}#welcome ul li a { color:#000000; text-decoration:none; margin:0 5px; }#welcome ul li.login a { color:#1a66b3; }#welcome ul li.shopping{background:url(../images/shopping.gif) left center no-repeat; padding-left:20px;}#welcome ul li em { display:block; float:left; height:7px; margin:6px 0; border-right:1px solid #bcbcbc; overflow:hidden; }#welcome ul li a.arrow{ background:url(../images/arrow.gif) right center  no-repeat; padding-right:12px;}#mainNav #logo{ float:left; width:160px; text-align:center}#mainNav .large{float:left; width:450px;}#mainNav .large .organge{color:#ff6600; }#mainNav .large ul li{float:left; margin:0 2px; line-height:30px; font-size:14px; text-align:center; font-weight:bold; }#mainNav .large ul li a{display:block; background:url(../images/nav_bg.gif); width:77px; text-decoration:none; color:#333;}#mainNav .large ul li.home a{background:url(../images/nav_home.gif); width:59px;color:#fff; }#mainNav .side { float:right; margin-top:30px; }#mainNav .side ul li em { display:block; float:left; height:7px; margin:6px 0; border-right:1px solid #bcbcbc; overflow:hidden; }#mainNav .side ul li a { margin:0 5px; color:#333; text-decoration:none; }#mainNav .side ul li a.arrow { background:url(../images/arrow.gif) right center no-repeat; padding-right:12px; }#navbar { clear:both; background:#fc883b; height:30px; }#navbar ul li { float:left; line-height:30px; }#navbar ul li a { color:#fff; text-decoration:none; padding:0 9px; }#navbar ul li em { display:block; float:left; border-left:#dc6b04; border-right:1px solid #fba455; height:5px; margin:12px 0; overflow:hidden;
为什么就一个单独的div样式应用部了,其他的都没问题,急_html/css_WEB-ITnose
    
网上购物享当当
           
        

解决了,原来是多了个

标签>

登录后复制

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至253000106@qq.com举报,一经查实,本站将立刻删除。

发布者:PHP中文网,转转请注明出处:https://www.chuangxiangniao.com/p/2843544.html

(0)
上一篇 2025年3月10日 06:04:43
下一篇 2025年3月10日 06:04:50

AD推荐 黄金广告位招租... 更多推荐

相关推荐

发表回复

登录后才能评论