页面没完全打开时,页面显示不正确

lukylfm 2010-07-20 12:18:26
http://localhost:8080/lll/goods_list.php?type=3

上面的网页,页面完全打开时,分辨率为1024*768的情况下是正确显示的

没完全打开时,右面商品列表是给撑到下面了,不知为什么

还有分辨率为1024*768时左右两部分正常,当分辨率大一些时,就会给撑开,为什么哈

more_goods.css

@charset "gb2312";
/* CSS Document */

#peopmorelist{

width:715px;
height:690px;

margin-right:8px;
border:1px solid #A8C29F;
float:right;}

#toplist{
/* width:639px;
height:35px;
border:1px solid #033;*/
/* background-image:url(../img/wj_04.gif);
*/ }
#peoplist{

width:630px;
height:530px;
margin-left:0px;
border:1px solid #A8C29F;
}

#people{

margin-right:3px;
margin-left:5px;

float:left;
width:108px;
height:160px;
margin-top:5px;
/* border:1px solid #666;*/
}
#peopleimg img{
/* margin-top:5px;
*/ width:107px;
height:110px;
border:1px solid #666;}
#pgoodsale{
font-size:12px;
text-align:center;

/* border:1px solid #006;*/
}
#pgoodsalecu{
font-size:12px;
text-align:center;
color:#C00;
}
#pgoodsname{
text-align:center;
margin-top:5px;
font-size:12px;
/* border:1px solid #900;*/
height:28px;
}
#moregoods{

font-size:15px;
width:600px;
margin-bottom:0px;
text-align:right;
margin-right:0px;
padding-right:0px;
/* border:1px solid #009;
*/ color:#C03;
margin-top:3px;
}
#pagegoods{
font-size:12px;
color:#666;
text-align:center;
}
#morelist{
height:670px;
border:1px solid #A8C29F;

}
#pagegoods a{
color:#999;
font-size:12px;

}
a:visited{
text-decoration:none;
}




xuanxianglist.css



@charset "gb2312";
/* CSS Document */

a:link{
color:#00F;
text-decoration:none;
}
a:visited {
color: #00F;
text-decoration:none;
}
a:hover {
color: #c00;
text-decoration:underline;
}
ul{ list-style:none;}





#Tab1{
width:250px;
padding:0px;
margin:0 2px auto 8px;
font-size:12px;
text-align:center;
float:left;
/*border:1px solid #009;*/
/*height:200px;*/
}
.Menubox {
width:100%;
background:url(../img/left_top.jpg);
height:28px;
line-height:28px;
}

.Menubox ul{
margin:0px;
padding:0px;
}
.Menubox li{
float:left;
display:block;
cursor:pointer;
width:61px;
text-align:center;
color:#949694;
font-weight:bold;
}
.Menubox li.hover{
padding:0px;
background:#fff;
width:62px;
border-left:1px solid #A8C29F;
border-top:1px solid #A8C29F;
border-right:1px solid #A8C29F;
background:url(../img/left_over.jpg);
color:#739242;
font-weight:bold;
height:27px;
line-height:27px;
}
.Contentbox{
clear:both;
margin-top:0px;
border:1px solid #A8C29F;
border-top:none;
height:654px;
text-align:center;
padding-top:8px;

}


#neirong{
margin:auto auto auto auto;

}

#tuijianlist{
width:235px;
height:650px;
border:1px solid #999;
margin-left:5px;
}
#tuijian{
width:230px;
height:100px;
border-bottom:1px dotted #006;
}
#tuijianimg{
width:95px
height:95px;
float:left;}
#tuijianimg img{
width:90px;
height:95px;
float:left;
margin-left:10px;
margin-top:0px;
border:1px solid #DEDDDC;
}

#pgdsname{
font-size:12px;
font-family:微软雅黑;
margin-top:0px;
}
#pgdsale{
text-decoration:line-through;
font-size:14px;
color:#C03;
font-family:黑体;
margin-top:5px;
}
#pgdtoysale{
font-size:12px;
margin-top:5px;}
#pgdshopsale{
font-size:14px;
font-family:微软雅黑;
margin-top:5px;}
#leftlist{
margin-top:0px;

/* border:1px solid #666;
*/ margin-top:3px;}
#genduo{
width:100px;
height:15px;
font-size:12px;
float:right;
margin-top:3px;
}
a:visited{
text-decoration:none;}


...全文
78 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
lukylfm 2010-07-21
  • 打赏
  • 举报
回复
嗯嗯,我去试试
  • 打赏
  • 举报
回复
去看看DIV宽高的百分比设置和EM设置.弹性布局和液态布局.
青年庞 2010-07-20
  • 打赏
  • 举报
回复
1.如果不考虑宽屏问题,就宽度写死了后让页面居中,页面怎么完全打开,内容就只在中间显示。

2.如果考虑宽屏,一个方案是把宽度用百分比来定义,还有就是用js动态的取屏幕的分辨率,来给页面定义高度和宽度
cheng20100915 2010-07-20
  • 打赏
  • 举报
回复
定义层或表格的时候他的长度定义为百分比,
不要写死,这样就不会出现什么问题了.楼主试试.
如 width:80%;
ronniegxq 2010-07-20
  • 打赏
  • 举报
回复
用百分比来设置长宽高吧,写死不太好

61,115

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧