急:网页莫名其妙的变形了 我都没编辑过这个页面怎么突然就变形了?求解 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 贴出代码<table class="style1" border="0" cellpadding="0" cellspacing="0" align="center"> <tr valign="top"> <td style=" background-color: #EEF2FA; " valign="top" class="style5"><uc3:newsclass ID="newsclass1" runat="server" /></td> <td style="width:750px; text-align: left;" valign="top" align="center"> <div id="lat" style="background-color: #DEE7F9; width: 753px;">The Current Position:<a href="/">Home</a> ><asp:Label ID="Label1" runat="server"></asp:Label> </div><div > <asp:Repeater ID ="rp_news" runat ="server" ><ItemTemplate > <table class="style2"> <tr> <td class="style3"> <img src ="images/fuhao_08.gif" alt ="新闻列表" /></td> <td class="style4"> <a href ='newsdetail.aspx?id=<%#Eval("NewsId")%>' title='<%#Eval("NewsTitle")%>'><%#Eval("NewsTitle").ToString ()%></a></td> <td style="text-align: center"> <%#Eval("NewsTime") %></td> </tr> </table> </ItemTemplate></asp:Repeater> <webdiyer:AspNetPager ID="AspNetPager1" runat="server" PageSize="15" CustomInfoHTML="共%PageCount%页,当前为第%CurrentPageIndex%页,每页%PageSize%条" FirstPageText="Home" LastPageText="尾页" NextPageText="下一页" onpagechanging="AspNetPager1_PageChanging" PrevPageText="上一页" ShowCustomInfoSection="Left" ShowPageIndexBox="Always" SubmitButtonText="Go" TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到"> </webdiyer:AspNetPager> </div></td> </tr> </table> <td style="width:750px; text-align: left;" valign="top" align="center"> <div id="lat" style="background-color: #DEE7F9; width: 753px;"> The Current Position: <a href="/">Home</a> ><asp:Label ID="Label1" runat="server"></asp:Label> </div>这个地方div比tb还大吧好像,这样的代码很难看很麻烦滴,顺带一张效果图出来吧!! 你的哪些class里面定义的css好好检查下 首先一目了然 应该是你下面的右边的里面信息的盒子太大 超过了外面的盒子大小。你可以尝试先删掉你右边的信息的盒子(包含信息的HTML语句),看下网页是否还是变形的,如果不,就能确定是你信息的盒子太大,如果还是变形,你就查看下他上级的盒子的大小,以此类推;可以一步步来查询问题 知道问题了 就好办了 修改CSS样式 就OK。 是不是 div 浮动了呢 清一下就可以了 道行不够看不出你哪里出问题了,推荐你用火狐的firbug找一找 每个节点所划定的区域是看的很清楚的。 css样式被改变了,查看下css文件 <td style="width:750px; text-align: left;" valign="top" align="center"> <div id="lat" style="background-color: #DEE7F9; width: 753px;">先把这两个东西去掉后 看效果 在告诉你个好办法 在firefox下 用F12直接调试 更改样式 直到是你想要滴 给已经定义好样式的div加个有颜色的border进行检查吧,要逐个添加,逐个检查,才容易发现错误哦! 把这个table给个固定宽度,要大于753,在看看这个table外部的样式表 代码又不完整.css又没有...怎么搞? 完整的来了代码:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NewsClass.aspx.cs" Inherits="NewsClass" %><%@ Register src="com/top.ascx" tagname="top" tagprefix="uc1" %><%@ Register src="com/foot.ascx" tagname="foot" tagprefix="uc2" %><%@ Register src="com/newsclass.ascx" tagname="newsclass" tagprefix="uc3" %><%@ Register src="com/tuijian.ascx" tagname="tuijian" tagprefix="uc4" %><%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1" runat="server"> <title>无标题页</title> <link href ="images/css.css" type ="text/css" rel="Stylesheet" /> <style type="text/css"> .style1 { width: 100%; } .style2 { width: 750px; line-height:25px; } .style3 { width: 22px; text-align: center; } .style4 { width: 541px; } .style6 { height: 400px; width: 281px; } </style></head><body> <form id="form1" runat="server"> <div style="text-align: center" align="center"> <uc1:top ID="top1" runat="server" /> <table class="style1" border="0" cellpadding="0" cellspacing="0" align="center"> <tr valign="top" > <td style=" background-color: #EEF2FA; width:120px;" valign="top" class="style6" ><uc3:newsclass ID="newsclass1" runat="server" /></td> <td style="width:750px; text-align: left;" valign="top" align="center"><div> <div id="lat" style="background-color: #DEE7F9; width: 750px;">The Current Position:<a href="/">Home</a> ><asp:Label ID="Label1" runat="server"></asp:Label> </div><div style="width:860px;" align="right"> <asp:Repeater ID ="rp_news" runat ="server" ><ItemTemplate > <table class="style2" > <tr> <td class="style3"> <img src ="images/fuhao_08.gif" alt ="" /></td> <td class="style4"> <a href ='newsdetail.aspx?id=<%#Eval("NewsId")%>' title='<%#Eval("NewsTitle")%>'><%#Eval("NewsTitle").ToString ()%></a></td> <td style="text-align: center"> <%#Eval("NewsTime") %></td> </tr> </table> </ItemTemplate></asp:Repeater> <webdiyer:AspNetPager ID="AspNetPager1" runat="server" PageSize="15" CustomInfoHTML="共%PageCount%页,当前为第%CurrentPageIndex%页,每页%PageSize%条" FirstPageText="Home" LastPageText="尾页" NextPageText="下一页" onpagechanging="AspNetPager1_PageChanging" PrevPageText="上一页" ShowCustomInfoSection="Left" ShowPageIndexBox="Always" SubmitButtonText="Go" TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到"> </webdiyer:AspNetPager> </div></div></td> </tr> </table> <uc2:foot ID="foot1" runat="server" /> </div> </form></body></html>CSS:body{padding:0; margin:0; font-size:12px; color:#000}a{font-size:12px; color:#333; text-decoration:none}a:hover{color:#f00; text-decoration:underline}img{border:none}.aboutpic{border:1px solid #B2C2E3; padding:3px; margin:8px}.img:visited img{border: 1px solid #B2C2E3;}.img img{border: 1px solid #B2C2E3;padding:5px;}.img:hover img{border: 1px solid #3477C5;}.img:hover{color: #B2C2E3; }#nav{}#nav ul{padding:0; margin:0}#nav li{padding:0 15px; background:url(bg-nav-s.jpg) right no-repeat; float:left; list-style:none}#nav li a{font-size:14px; font-weight:bold; color:#ECF2FB}#nav li a:hover{color:#D0D0D0}#line{border:0px solid #A9B9DA; height: 178px;}#line2{margin:5px 0; height: 211px; }:0px solid #A9B9DA; margin-top:10px; text-align:center; line-height:23px; height: 208px; width: 751px;}:0px solid #A9B9DA; margin-top:10px; text-align:center; line-height:23px; padding:15px; background:#EEF2FA}#line4{border:1px solid #A9B9DA; margin-top:5px; line-height:20px; padding:5px}#title{font-size:14px; font-weight:bold; font-family: 微软雅黑,sans-serif; text-align:center; margin:30px auto 0 auto; letter-spacing:5px}#body{font-size:12px; line-height:28px; padding:20px; text-align: left; width: 749px;}#lt{text-align:center; color:#333; margin:4px auto; font-size:12px; font-weight:bold; font-family: 微软雅黑,sans-serif; letter-spacing:3px}#abt{float:left#abt{float:left; color:#333; margin:4px 10px; font-size:16px; font-weight:bold; font-family: 微软雅黑,sans-serif; letter-spacing:3px; width: 179px; height: 19px;}:right; margin-right:10px; height: 13px; width: 601px;}#lat{padding:8px 0 8px 20px; font-weight:bold;}#sc{line-height:20px; text-align:center}#left {margin:0}#left ul{margin-left:0px;list-style:none;padding:0;border:0;margin:0;}#left li {display: inline;list-style-type: none;}#left li a:link,#left li a:visited {width:100%; float:left; padding:9px 0; text-align:center; text-decoration: none;color:#333333;background:#F7F7F7;}#left li a:hover {color:#000; background-color:#E2EAF5;}#leftl {margin:0}#leftl ul{margin-left:0px;list-style:none;padding:0;border:0;margin:0;}#leftl li {display: inline;list-style-type: none;}#leftl li a:link,#leftl li a:visited {width:100%; float:left; padding:9px 0; text-align:left; text-decoration: none;color:#333333;background:#F7F7F7;}#leftl li a:hover {color:#000; background-color:#E2EAF5;}#lefti {margin:0}#lefti ul{margin-left:0px;list-style:none;padding:0;border:0;margin:0;}#lefti li {display: inline;list-style-type: none;}#lefti li a:link,#lefti li a:visited {width:100%; text-align:center; float:left; padding:9px 0; text-decoration: none;color:#333333;background:#F7F7F7; font-weight:bold}#lefti li a:hover {color:#000; background-color:#E2EAF5;}#lovexin12{width:90px; height:auto; background-color:#EEF2FA; border:1px solid #A9B9DA}#t{width:auto; height:25px; background-color:#2F7DC7; font-size:14px; font-weight:bold; text-align:center; color:#FFF; padding-top:5px;}#qq{margin:10px; text-align:center;} 问题找到了是<table class="style1" border="0" cellpadding="0" cellspacing="0" align="center">没设置宽度··· 关于imagefield的使用 为什么总是无法显示图片 简单问题,,去除第一个字符 我学,我改! 求一个博客的源代码.参考用. access向oracle转化的问题 动态创建控件问题 急!思归大侠请进!!(水晶报表编译问题!!) 登陆成功后,自动跳转的问题 这样写为什么不对?请指教 有关<Form action=""><input type="submit"><asp:button Onclick="">关注一下吧!多谢! asp.net验证手机号码归属地 简单的问题
贴出代码<table class="style1" border="0" cellpadding="0" cellspacing="0" align="center">
<tr valign="top">
<td style=" background-color: #EEF2FA; " valign="top"
class="style5"><uc3:newsclass ID="newsclass1"
runat="server" /></td>
<td style="width:750px; text-align: left;" valign="top" align="center">
<div id="lat" style="background-color: #DEE7F9; width: 753px;">The Current Position
:<a href="/">Home</a> ><asp:Label ID="Label1" runat="server"></asp:Label>
</div><div >
<asp:Repeater ID ="rp_news" runat ="server" ><ItemTemplate >
<table class="style2">
<tr>
<td class="style3">
<img src ="images/fuhao_08.gif" alt ="新闻列表" /></td>
<td class="style4">
<a href ='newsdetail.aspx?id=<%#Eval("NewsId")%>' title='<%#Eval("NewsTitle")%>'><%#Eval("NewsTitle").ToString ()%></a></td>
<td style="text-align: center">
<%#Eval("NewsTime") %></td>
</tr>
</table>
</ItemTemplate></asp:Repeater>
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" PageSize="15"
CustomInfoHTML="共%PageCount%页,当前为第%CurrentPageIndex%页,每页%PageSize%条"
FirstPageText="Home" LastPageText="尾页" NextPageText="下一页"
onpagechanging="AspNetPager1_PageChanging" PrevPageText="上一页"
ShowCustomInfoSection="Left" ShowPageIndexBox="Always" SubmitButtonText="Go"
TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到">
</webdiyer:AspNetPager>
</div></td>
</tr>
</table>
<td style="width:750px; text-align: left;" valign="top" align="center">
<div id="lat" style="background-color: #DEE7F9; width: 753px;">
The Current Position:
<a href="/">Home</a> ><asp:Label ID="Label1" runat="server"></asp:Label>
</div>这个地方div比tb还大吧好像,这样的代码很难看很麻烦滴,顺带一张效果图出来吧!!
<div id="lat" style="background-color: #DEE7F9; width: 753px;">
先把这两个东西去掉后 看效果 在告诉你个好办法 在firefox下 用F12直接调试 更改样式 直到是你想要滴
怎么搞?
代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NewsClass.aspx.cs" Inherits="NewsClass" %><%@ Register src="com/top.ascx" tagname="top" tagprefix="uc1" %><%@ Register src="com/foot.ascx" tagname="foot" tagprefix="uc2" %><%@ Register src="com/newsclass.ascx" tagname="newsclass" tagprefix="uc3" %><%@ Register src="com/tuijian.ascx" tagname="tuijian" tagprefix="uc4" %>
<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>无标题页</title>
<link href ="images/css.css" type ="text/css" rel="Stylesheet" />
<style type="text/css">
.style1
{
width: 100%;
}
.style2
{
width: 750px;
line-height:25px;
}
.style3
{
width: 22px;
text-align: center;
}
.style4
{
width: 541px;
}
.style6
{
height: 400px;
width: 281px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div style="text-align: center" align="center">
<uc1:top ID="top1" runat="server" /> <table class="style1" border="0" cellpadding="0" cellspacing="0" align="center">
<tr valign="top" >
<td style=" background-color: #EEF2FA; width:120px;" valign="top" class="style6"
><uc3:newsclass ID="newsclass1"
runat="server" /></td>
<td style="width:750px; text-align: left;" valign="top" align="center"><div>
<div id="lat" style="background-color: #DEE7F9; width: 750px;">The Current Position
:<a href="/">Home</a> ><asp:Label ID="Label1" runat="server"></asp:Label>
</div><div style="width:860px;" align="right">
<asp:Repeater ID ="rp_news" runat ="server" ><ItemTemplate >
<table class="style2" >
<tr>
<td class="style3">
<img src ="images/fuhao_08.gif" alt ="" /></td>
<td class="style4">
<a href ='newsdetail.aspx?id=<%#Eval("NewsId")%>' title='<%#Eval("NewsTitle")%>'><%#Eval("NewsTitle").ToString ()%></a></td>
<td style="text-align: center">
<%#Eval("NewsTime") %></td>
</tr>
</table>
</ItemTemplate></asp:Repeater>
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" PageSize="15"
CustomInfoHTML="共%PageCount%页,当前为第%CurrentPageIndex%页,每页%PageSize%条"
FirstPageText="Home" LastPageText="尾页" NextPageText="下一页"
onpagechanging="AspNetPager1_PageChanging" PrevPageText="上一页"
ShowCustomInfoSection="Left" ShowPageIndexBox="Always" SubmitButtonText="Go"
TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到">
</webdiyer:AspNetPager>
</div></div></td>
</tr>
</table>
<uc2:foot ID="foot1" runat="server" />
</div>
</form>
</body>
</html>
CSS:
body{padding:0; margin:0; font-size:12px; color:#000}
a{font-size:12px; color:#333; text-decoration:none}
a:hover{color:#f00; text-decoration:underline}
img{border:none}
.aboutpic{border:1px solid #B2C2E3; padding:3px; margin:8px}
.img:visited img{border: 1px solid #B2C2E3;}
.img img{border: 1px solid #B2C2E3;padding:5px;}
.img:hover img{border: 1px solid #3477C5;}
.img:hover{color: #B2C2E3; }
#nav{}
#nav ul{padding:0; margin:0}
#nav li{padding:0 15px; background:url(bg-nav-s.jpg) right no-repeat; float:left; list-style:none}
#nav li a{font-size:14px; font-weight:bold; color:#ECF2FB}
#nav li a:hover{color:#D0D0D0}
#line{border:0px solid #A9B9DA;
height: 178px;
}
#line2{margin:5px 0;
height: 211px;
}
:0px solid #A9B9DA; margin-top:10px; text-align:center; line-height:23px;
height: 208px;
width: 751px;
}
:0px solid #A9B9DA; margin-top:10px; text-align:center; line-height:23px; padding:15px; background:#EEF2FA}
#line4{border:1px solid #A9B9DA; margin-top:5px; line-height:20px; padding:5px}
#title{font-size:14px; font-weight:bold; font-family: 微软雅黑,sans-serif; text-align:center; margin:30px auto 0 auto; letter-spacing:5px}
#body{font-size:12px; line-height:28px; padding:20px;
text-align: left;
width: 749px;
}
#lt{text-align:center; color:#333; margin:4px auto; font-size:12px; font-weight:bold; font-family: 微软雅黑,sans-serif; letter-spacing:3px}
#abt{float:left
#abt{float:left; color:#333; margin:4px 10px; font-size:16px; font-weight:bold; font-family: 微软雅黑,sans-serif; letter-spacing:3px;
width: 179px;
height: 19px;
}
:right; margin-right:10px;
height: 13px;
width: 601px;
}
#lat{padding:8px 0 8px 20px; font-weight:bold;}
#sc{line-height:20px; text-align:center}
#left {margin:0}
#left ul{margin-left:0px;list-style:none;padding:0;border:0;margin:0;}
#left li {display: inline;list-style-type: none;}
#left li a:link,
#left li a:visited {width:100%; float:left; padding:9px 0; text-align:center; text-decoration: none;color:#333333;background:#F7F7F7;}
#left li a:hover {color:#000; background-color:#E2EAF5;}
#leftl {margin:0}
#leftl ul{margin-left:0px;list-style:none;padding:0;border:0;margin:0;}
#leftl li {display: inline;list-style-type: none;}
#leftl li a:link,
#leftl li a:visited {width:100%; float:left; padding:9px 0; text-align:left; text-decoration: none;color:#333333;background:#F7F7F7;}
#leftl li a:hover {color:#000; background-color:#E2EAF5;}
#lefti {margin:0}
#lefti ul{margin-left:0px;list-style:none;padding:0;border:0;margin:0;}
#lefti li {display: inline;list-style-type: none;}
#lefti li a:link,
#lefti li a:visited {width:100%; text-align:center; float:left; padding:9px 0; text-decoration: none;color:#333333;background:#F7F7F7; font-weight:bold}
#lefti li a:hover {color:#000; background-color:#E2EAF5;}
#lovexin12{width:90px; height:auto; background-color:#EEF2FA; border:1px solid #A9B9DA}
#t{width:auto; height:25px; background-color:#2F7DC7; font-size:14px; font-weight:bold; text-align:center; color:#FFF; padding-top:5px;}
#qq{margin:10px; text-align:center;}
没设置宽度···