|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Style Sheet not getting applied to content pageapplied like how it looks in visual studio design view. The master page is defined like this: <%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %> <!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>Overbored.com</title> <link rel="stylesheet" type="text/css" href="StyleSheet.css" /> </head> <body> <div id="wrapper"> <form id="Form1" runat="server"> <div id="header"> <span class="title">Overbored.com</span> <span class="breadcrumb">Todo: Breadcrumb will go here...</span> </div> <div id="content"> <asp:ContentPlaceHolder ID="MainContent" runat="server"> </asp:ContentPlaceHolder> </div> <div id="navigation"> <span class="title">Overbored.com</span> <div id="Div1"> <asp:Menu ID="menu1" DataSourceID="SiteMapDataSource1" runat="server"></asp:Menu> <asp:SiteMapDataSource ID="SiteMapDataSource1" ShowStartingNode="false" runat="server" /> </div> </div> </form> </div> <div id="footer"> <a href="http://www.overbored.com/Portal">http://www.overbored.com</a> </div> </body> </html> The content page is defines like this: <%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Login.aspx.vb" Inherits="Login" %> <asp:Content ID="LoginContent" ContentPlaceHolderID="MainContent" Runat="Server"> <div> <asp:Login ID="Login1" runat="server" BackColor="#EFF3FB" BorderColor="#B5C7DE" BorderPadding="4" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#333333"> <TitleTextStyle BackColor="#507CD1" Font-Bold="True" Font-Size="0.9em" ForeColor="White" /> <InstructionTextStyle Font-Italic="True" ForeColor="Black" /> <TextBoxStyle Font-Size="0.8em" /> <LoginButtonStyle BackColor="White" BorderColor="#507CD1" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284E98" /> </asp:Login> </div> </asp:Content> The style sheet is in the root folder and is called StyleSheet.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: Arial, Helvetica, sans-serif; border-top: 2px solid #3366CC; } /* Header Section */ #header { border-top: 3px solid #3366CC; border-bottom: 1px dotted #3366CC; 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 .breadcrumb { font: 90% Arial, Helvetica, Georgia, "Times New Roman", Times, serif; color: #FFFFFF; background-color: transparent; float: right; margin-right: 2em; margin-top: 0.8em; font-weight:bold; } #header a:link, a:visited { color: #B51032; } /* Footer */ #footer { position: absolute; bottom: 0; left: 0; width: 100%; height: 1.5em; background-color: #3366CC; color: #3366CC; border-top: #778899; text-align: center; } #footer a:link, #footer a:visited { padding: 0.8em 1em 0.5em 1em; color: #FFFFFF; background-color: transparent; font-size: 80%; } /* Navigation */ #navigation { width: 200px; top: 5em; left: 1em; width: 13em; position:absolute; font-family: 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:link, #navigation li a:visited { 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; } #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; } /* 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; } In visual studio designer the content page looks right but when i run the application the master page style is not applied. The content of the master page is applied but not the style. Please help! |
|||||||||||||||||||||||