加为好友
发送私信
在线聊天
xiaoyuzi
等级:
可用分等级:富农
总技术分:4388
总技术分排名:4689
揭贴率:81.58%
发表于:2008-04-24 13:34:07 楼主
default.aspx 和 login.aspx都共用一个魔板页,没有登陆就会进入login.aspx,发现Style.css都没有效果,但是登陆后跳转到default.aspx,default.aspx上效果是好用的,下面是魔板和css文件内容 Site.master ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ <%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site.master.cs" Inherits="Site" %> <!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>Forms Authentication, Authorization, and User Accounts </title> <link href="Styles.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="wrapper"> <form id="form1" runat="server"> <div id="header"> <span class="title">User Account Tutorials </span> <br /> </div> <div id="content"> <asp:contentplaceholder id="MainContent" runat="server"> <!-- Page-specific content will go here... --> </asp:contentplaceholder> </div> <div id="navigation"> <asp:ContentPlaceHolder ID="LoginContent" runat="server"> <asp:LoginView ID="LoginView1" runat="server"> <LoggedInTemplate> Welcome back, <asp:LoginName ID="LoginName1" runat="server" />. </LoggedInTemplate> <AnonymousTemplate> Hello, stranger. </AnonymousTemplate> </asp:LoginView> <br /> <asp:LoginStatus ID="LoginStatus1" runat="server" LogoutAction="Redirect" LogoutPageUrl="~/Logout.aspx" /> <br /> <br /> </asp:ContentPlaceHolder> TODO: Menu will go here... </div> </form> </div> </body> </html> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Style.css ----------------------------- /* The below CSS file was built using samples + techniques described by Rachel Andrew in her book: The CSS Anthology: 101 Essential Tips, Tricks & Hacks */ /* Overall Page */ body { margin: 0; padding-bottom: 2em; background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; border-top: 2px solid #B51032; } /* Header Section */ #header { border-top: 3px solid #B51032; border-bottom: 1px dotted #B51032; height: 3em; } #header .title { font: 190% Arial, Helvetica, Georgia, "Times New Roman", Times, serif; color: black; background-color: transparent; float: left; margin-right: 2em; margin-top: 0.3em; margin-left: .8em; } #header a:link, a:visited { color: #B51032; } /* Navigation */ #navigation { width: 200px; top: 5em; left: 1em; width: 13em; position:absolute; font-family: Verdana, Arial, Helvetica, sans-serif; font-size:90%; } #navigation ul { list-style: none; margin: 0; padding: 0; } #navigation li { border-bottom: 1px solid #ED9F9F; } #navigation li a { display: block; padding: 5px 5px 5px 0.5em; border-left: 12px solid #711515; border-right: 1px solid #711515; background-color: #B51032; color: #FFFFFF; text-decoration: none; } #navigation li a:hover { background-color: #711515; color: #FFFFFF; } #navigation ul ul { margin-left: 12px; } #navigation ul ul li { border-bottom: 1px solid #711515; margin:0; background-color: #ED9F9F; color: #711515; } #navigation ul ul a:link, #navigation ul ul a:visited { background-color: #ED9F9F; color: #711515; } #navigation ul ul a:hover { background-color: #711515; color: #FFFFFF; } #header .breadcrumb { font: 90% Arial, Helvetica, Georgia, "Times New Roman", Times, serif; color: black; background-color: transparent; float: right; margin-right: 2em; margin-top: 0.8em; font-weight:bold; } /* Main Content */ #content { margin-top:1em; margin-left: 16em; margin-right: 2em; } h1 { font: 150% Arial, Helvetica, Georgia, "Times New Roman", Times, serif; } #content p { font-size: 80%; line-height: 1.6em; } #content ul { font-size: 80%; line-height: 1.6em; } +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
问题点数: 100 回复次数:2
显示所有回复 显示星级回复 显示楼主回复
修改
删除
举报
引用
回复