1

我正在使用 Visual Studio 2012,为我的网站创建了一个母版页。所有其他页面都运行良好,但只有一页让我发疯。

.aboutus
{ margin: auto;
font-family: 'Bookman Old Style';
font-style: normal;
font-weight: 100;
max-height:700px;
overflow:scroll;
overflow-x:hidden;}

.aboutus h1, .aboutus h2, .aboutus h3
{
    color:blue;
    font-style:italic;
    font-weight: 500;}

如果我使用这个 css 类,它可以在 IE 上正常工作,但在 Chrome 或 mozilla 中没有显示。即使我从 .aboutus css 类中删除内容,它仍然存在同样的问题。

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="aboutus">
<h1>About us…&lt;/h1>
<p>Regional Automotive was started in 1994 at it’s current location in Ottawa 
    as a sister c..........
 </div></asp:Content>

我的 asp:内容来自母版页

<div class="main-content">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"></asp:ContentPlaceHolder>
 </div> 

我在我的母版页中使用它,所以我不必为每一页一次又一次地写同样的东西

.main-content
{display:block;
background-color:transparent;
min-height: 700px;
max-height:700px;
margin-left:2px;
margin-top:68px;}   

可能是这件事引起了问题。

4

1 回答 1

0

我尝试复制您的代码并在我的电脑上使用。在 Opera、Chrome、IE 中运行良好。

你有最新版本的浏览器吗?您可以尝试逐行编写css文件并尝试发现问题所在的行

于 2013-07-03T16:41:59.480 回答