columns css not changes

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
8/16/2009 1:38:25 PM
Gravatar
Total Posts 71

columns css not changes

hi all, i have created new skin for my site but when I add or remove contents from "divCenter" ,it's css class do not changes !!!

generated html code for 3 columns layout :
....<div id="ctl01_divCenter" class="center-nomargins">
.....

''class must be : center-rightandleftmargins"

 

this is my layout.master page:

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="layout.master.cs" Inherits="Data_Sites_1_skins_mmcgee_uncreativesuite_3_layout" %>

<!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 runat="server">
<title>Untitled Page</title>
<portal:StyleSheetCombiner id="StyleSheetCombiner" runat="server" />
<portal:ScriptLoader id="ScriptLoader1" runat="server" />
</head>
<body>
<form id="frmMain" runat="server">
<asp:SiteMapDataSource ID="SiteMapData" runat="server" ShowStartingNode="false" />
<asp:SiteMapDataSource ID="PageMapDataSource" runat="server" ShowStartingNode="false" />
<asp:SiteMapDataSource ID="ChildPageSiteMapData" runat="server" ShowStartingNode="false" />

<center>
<div id="wrapwebsite">

<div id="pageEditContentDiv">
<asp:contentplaceholder ID="pageEditContent" runat="server"></asp:contentplaceholder>
</div>

<div class="topnav">
<ul>
<portal:WelcomeMessage id="WelcomeMessage" runat="server" RenderAsListItem="true" ListItemCSS="firstnav" />
<portal:HomeLink id="HomeLink" runat="server" RenderAsListItem="true" />
<portal:SiteMapLink id="SiteMapLink2" runat="server" CssClass="sitelink" RenderAsListItem="true" />
<portal:MyPageLink id="MyPageLink1" runat="server" RenderAsListItem="true" />
<portal:UserProfileLink id="UserProfileLink" runat="server" RenderAsListItem="true" />
<portal:MailboxLink id="MailboxLink1" runat="server" RenderAsListItem="true" />
<portal:MemberListLink id="MemberListLink" runat="server" RenderAsListItem="true" />
<portal:SearchInput id="SearchInput1" LinkOnly="True" RenderAsListItem="true" runat="server" />
<portal:RegisterLink id="RegisterLink" runat="server" RenderAsListItem="true" />
<portal:LoginLink id="LoginLink1" runat="server" RenderAsListItem="true" />
<portal:LogoutLink id="LogoutLink1" runat="server" RenderAsListItem="true" />
</ul>
</div>

<div id="siteMenuDiv">
<portal:SiteMenu id="SiteMenu1" runat="server" ShowMenu="true" ShowTreeView="false"
TopLevelOnly="false" Direction="Horizontal">
</portal:SiteMenu>
</div>

<div style="clear:both"></div>
<div class="wrapcenter">
<div>
<asp:Panel id="divLeft" runat="server" cssclass="leftside" visible="True" SkinID="pnlPlain">
<asp:contentplaceholder ID="leftContent" runat="server"></asp:contentplaceholder>
</asp:Panel>
</div><div>
<asp:Panel id="divCenter" runat="server" visible="true" cssclass="center-nomargins" SkinID="pnlPlain">
<asp:ContentPlaceHolder ID="mainContent" runat="server"></asp:ContentPlaceHolder>
</asp:Panel>

</div><div>
<asp:Panel id="divRight" runat="server" visible="true" cssclass="rightside" SkinID="pnlPlain">
<asp:contentplaceholder ID="rightContent" runat="server"></asp:contentplaceholder>
</asp:Panel>
</div>
</div>

</div>
</center>

</form>
</body>
</html>


skin files :
http://www.4shared.com/file/125462974/2aa68ae5/mmcgee-uncreativesuite_3.html
 

8/16/2009 2:21:18 PM
Gravatar
Total Posts 71

Re: columns css not changes

must inherits my layout.master from "mojoPortal.Web.layout" ????

what does mojoPortal.Web.layout.?

8/17/2009 12:46:37 AM
Gravatar
Total Posts 550

Re: columns css not changes

Hi Nasser,

I download your work and see it. You MUST not change the CodeBehind of layout.master and no need to have a new layout.master.cs file . Do following changes in your layout.master file.

Replace this line:

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="layout.master.cs" Inherits="Data_Sites_1_skins_mmcgee_uncreativesuite_3_layout" %>
 

With this:

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="~/App_MasterPages/layout.Master.cs" Inherits="mojoPortal.Web.layout" %>
 

Hope helps

Asad

8/17/2009 5:13:40 AM
Gravatar
Total Posts 18439

Re: columns css not changes

Hi,

Asad is correct, you should inherit from the built in App_MasterPages/layout.master which has code behind it that implements the automatic adaptation from 1 to 3 columns for the main layout by determining which columns have content and assiging css classes to the divs as needed. This is explained in the document http://www.mojoportal.com/understandingthelayoutmasterfile.aspx

Hope it helps,

Joe

8/17/2009 10:40:02 AM
Gravatar
Total Posts 71

Re: columns css not changes

thanks for your reply,

I copied one  of existence layout.master contents to my layout.master page and it works now, I will change some other parts and then uplaod it for consideration of  other mp users,

 

 

You must sign in to post in the forums. This thread is closed to new posts.