【发布时间】:2011-11-03 12:36:23
【问题描述】:
我在 VS2010 中工作,我设计了一个网站。在那个网站中,我设计了一个 CSS 并且该样式表仅在 Internet Explorer 中有效。 CSS 也应在所有浏览器(例如 Firefox、Chrome)中生效。
CSS 是
div.menuGlobal
{
background-color: #465c71;/*#4b6c9e;/*#4169E1;*/
padding: 10px;
padding-bottom:0px;
}
span.menuGlobal a.current:link,span.menu a.current:visited
{
display:inline-block;
font-weight:bold;
color:#0000CC;
background-color:white;
text-align:center;
padding:4px;
text-decoration:none;
width:70px;
padding:5px;
margin:0px;
}
span.menuGlobal a.current:hover,span.menuGlobal a.current:active
{
color:#32CD32;
background-color:#DFDFDF;
}
span.menuGlobal a:link,span.menu a:visited
{
display:inline-block;
font-weight:bold;
color:#0000CC;
background-color:#DCDCDC;
text-align:center;
padding:4px;
text-decoration:none;
width:70px;
padding:5px;
margin:0px;
}
span.menuGlobal a:hover,span.menuGlobal a:active
{
color:#32CD32;
background-color:#DFDFDF;
}
我使用了母版页并在该母版页上添加了另一个 CSS。并在我的网页中添加了这个母版页。上面的css文件也适用于同样的问题。我认为这有一些问题。
我的母版页有两个内容占位符。一个用于标题部分,另一个用于正文部分。我已经在子网页的标题内容页面持有者中添加了链接标签。
如何解决?
【问题讨论】:
-
这里不是问这样一个关于跨浏览器兼容性的一般问题的地方。对该主题进行谷歌搜索并阅读一些内容。如果您有任何更具体的问题,请再回来(确保先搜索现有问题和答案)
-
您如何指定所有浏览器都应使用此 CSS?你怎么知道它不适用于非 IE?