我知道有很多这样的问题,但似乎没有任何工作。我有一个内容页面存储在一个文件夹'注册',其CSS文件存储在另一个文件夹'StyleSheets'。我简单地将CSS链接拖放到内容页面的头部部分。它仍然不起作用。CSS文件没有链接到HTML页面
CSS文件:
.unmaintable {
width: 1000px;
text-align:left;
background-color:chocolate;
}
.unmaintable1 {
width:250px;
text-align:center;
}
.unmaintable2 {
width:250px;
}
.unmaintable3 {
width:250px;
}
.unmaintable4 {
width:250px;
}
.imagebuttons {
width:94px;
height:70px;
}
内容页:
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Reg-step1.aspx.cs" Inherits="Registration_Reg_step1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Title" Runat="Server">
Step 1
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" Runat="Server">
<link href="../StyleSheets/ContentPage.css" rel="stylesheet" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table cellpadding="0" cellspacing="0" class="unmaintable">
<tr>
<td class="unmaintable1"> </td>
<td class="unmaintable2"> </td>
<td class="unmaintable3"> </td>
<td class="unmaintable4"> </td>
</tr>
<tr>
<td class="unmaintable1"> </td>
<td class="unmaintable2"> </td>
<td class="unmaintable3"> </td>
<td class="unmaintable4"> </td>
</tr>
</table>
</asp:Content>
这里有一个有趣的事情是,我得到了想要的结果,在设计模式(使用的Visual Studio 2013),但是当我运行它( IE11,CHROME,FIREFOX)它什么都不做。
是的,我很抱歉它是'StyleSheets'。我也编辑了这个问题。 – RelatedRhymes
加上一个讽刺CSS类名 – zeroef
@MrLister - 我一直在这样工作。这张桌子显示出相当不错的,当我把一个空的桌子wthout任何border.I有一个母版页和页脚,所以它很容易请参阅表格 – RelatedRhymes