我以前项目默认是360浏览器,
浏览出来的登录页面显示都很正常,(页面中有2个文本框一个按钮,都是显示在页面中间)但是我现在用IE8 浏览器了页面浏览出来后,
2个文本框和一个按钮显示的位置都发生很大的变化,这个问题怎么解决,怎么可以让2个浏览器都可以兼容???????
求解~~~~~~~~
浏览出来的登录页面显示都很正常,(页面中有2个文本框一个按钮,都是显示在页面中间)但是我现在用IE8 浏览器了页面浏览出来后,
2个文本框和一个按钮显示的位置都发生很大的变化,这个问题怎么解决,怎么可以让2个浏览器都可以兼容???????
求解~~~~~~~~
主要是JS呀什么的 各个浏览器不同
应该先适应IE 毕竟IE是主流哦
FF调 楼主 不要哭
其实每个人都调的很累呀
还是适应主流为主
360正常 IE就不正常了~~~~~ 悲剧~~~~~~
具体参考 css hack, 不兼容的样式, 根据不同的浏览,再写一次.JS的问题, 可以用jquery 插件来解决.
你意思一个浏览器写一个CSS?
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %><!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> <style type="text/css">
.style1
{
height: 126px;
border-spacing:0px;
}
.style2
{
color: #FFFFFF;
font-weight: bold;
width: 20%;
}
.style4
{
width: 37px;
}
.style5
{
height: 126px;
border-spacing: 0px;
width: 205px;
}
</style></head>
<body style="background-color:#026AAA;"> <form id="form1" runat="server"><div align="center">
<table border="0" width="1000" id="table1" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
<tr>
<td height="435" background="ekeer/index.jpg">
<table border="0" width="100%" id="table2" height="244" style="border-spacing:0px;">
<tr>
<td rowspan="3" class="style5"> </td>
<td colspan="2" class="style1">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<table style="padding: 10px; height: 110px; margin-top:40px" border="0" >
<tr>
<td height="30"align="right" class="style2">账号</td>
<td height="30" class="style4">
<asp:TextBox ID="txtusername" runat="server"></asp:TextBox>
</td>
</tr>
<tr style="border-spacing:30px;">
<td height="30" align="right" class="style2">密码</td>
<td height="30" class="style4">
<asp:TextBox ID="txtpwd" runat="server" TextMode="Password"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2">
<asp:ImageButton ID="ImageButtonlogin" runat="server"
ImageUrl="~/ekeer/dl-18.jpg" onclick="ImageButtonlogin_Click"
style="height: 18px" />
</td>
</tr>
</table>
</td>
<td rowspan="3" width="24%" class="style1"> </td>
</tr>
<tr>
<td height="53">
<p align="center"> </td>
<td height="53" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</div>
</form>
</body>
</html>
这样怎么做?
新手求解~~~~~~~~~
{
font-family: Tahoma;
/*font-size: 7.5pt\9;/* 所有ie浏览器*/
/*+font-size: 9pt;/*ie7*/
/*_font-size:9pt;/*ie6*/
height:20px;/* 火狐等其他浏览器*/
height:15px\9;/* 所有ie浏览器*/
+height:17px;/*ie7*/
_height:17px;/*ie6*/
width: 118px;/* 火狐等其他浏览器*/
width:116px\9;/* 所有ie浏览器*/
+width: 116px;/*ie7*/
_width:116px;/*ie6*/
/*padding-left:2px;
padding-top:2px;
padding-bottom:3px;*/
background-color: white;
border: solid 1px #9f9f9f;
float:left;/* 火狐等其他浏览器*/
float:left\9;/* 所有ie浏览器*/
+float:left;/*ie7*/
_float:left;/*ie6*/
}
* {font-family: "宋体";font-size: 12px;color: #000000;padding: 0px;margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;
}
body {margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;}
* {font-family: "宋体";font-size: 12px;color: #000000;padding: 0px;margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;
}
body {margin-top: 0px;margin-right: auto;margin-bottom: 0px;margin-left: auto;}
.style1
{
height: 126px;
border-spacing:0px;
}
.style2
{
color: #FFFFFF;
font-weight: bold;
width: 20%;
}
.style4
{
width: 37px;
}
.style5
{
height: 126px;
border-spacing: 0px;
width: 205px;
}
</style>
而你用的是Table。建议换成Div+css样式的估计么问题了。
本身table就比较难控制
引用 12 楼 journey_q 的回复:
引用 11 楼 w59879213 的回复:
只能逐个浏览器的看效果,然后写css样式~
具体参考 css hack, 不兼容的样式, 根据不同的浏览,再写一次.JS的问题, 可以用jquery 插件来解决.
你意思一个浏览器写一个CSS?可以这么做
[/Quote]
谢谢 我用26楼的方法早抖完成了[