View Single Post
  #1 (permalink)  
Old May 19th, 2011, 03:34 PM
mikeal_a mikeal_a is offline
Registered User
 
Join Date: Sep 2008
Location: Phoenix, AZ, .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default CH6 - master page not applying css correctly

Hello,
I'm going through CH6 and have created the master page and assigned the styles.css. When I view the master page in design view the sidebar is not going to the side as shown on figure 6-2 on page 201 when viewing frontend.master in design view. The css works fine on the default.aspx example. The sidebar is appearing underneath the menu. Any suggestions?

Here is a portion of css:
#MainContent
{
width: 664px;
float: left;
}
#Sidebar
{
background-color: #C0C0C0;
width: 180px;
float: left;
}

CODE for masterpage
<%@MasterLanguage="VB"CodeFile="Frontend.master.vb"Inherits="MasterPages_FrontEnd" %>
<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<
headrunat="server">
<title></title>
<asp:ContentPlaceHolderid="head"runat="server">
</asp:ContentPlaceHolder>
<linkhref="../Styles/styles.css"rel="stylesheet"type="text/css"/>
</
head>
<
body>
<formid="form1"runat="server">
<divid="PageWrapper">
<divid="Header"><ahref="~/"runat="server">Header Goes Here</a></div>
<divid="MenuWrapper">Menu Goes Here</div>
<divid="MainContent">
<asp:ContentPlaceHolderID="cpMainContent"runat="server">
</asp:ContentPlaceHolder><divid="Sidebar">Sidebar Goes Here</div><divid="Footer">Footer Goes Here</div></div>
</form>
</
body>
</
html>
Reply With Quote