學習如何在asp.net中做母版頁。試圖弄清楚我的樣式表如何與尊重主頁和內容頁的交互。我可以得到HTML標籤,比如body和樣式表來做出反應。但是,當我調用標籤的ID屬性時,不會發生樣式。就交互而言,我在這裏錯過了什麼? BTW我使用VS2008asp.net母版頁/內容頁面與樣式表的交互
CSS樣本:
body
{
height:1200px;
width:920px;
border-style:solid;
border-color:blue;
padding:10px 10px 10px 10px;
}
#toptext1
{
position:relative;
top:-225px;
right:-500px;
font-size:22px;
font-weight:bold;
}
從母版頁:
<body>
<form id="form1" runat="server">
<asp:image id="cookNookLogo" ImageUrl="images/Logo.gif" runat="server"
AlternateText="CookNook" Width="449px"></asp:image>
<p>
<asp:Label ID="toptext1" runat="server" Text="Quality Recipes, Hints and Supplies"></asp:Label>
</p>
從內容頁:
<%@ Page Language="C#" MasterPageFile="~/CNMasterPage.master" AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="Home" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<link href="App_Themes/cn/cn.css" rel="stylesheet" type="text/css" />
</asp:Content>
當我這樣做不一個母版頁,它的工作,我在哪裏出錯的屬性?
您是使用ASP.NET還是經典ASP? – 2010-05-05 19:55:41