Solved

MasterPasge, make body 100% width

Posted on 2011-02-14
6
1,115 Views
Last Modified: 2012-05-11
I need a master page with the content to fit all width of the screen, Right now, I havent been able to.



<%@Master language="C#"%>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="wssuc" TagName="DesignModeConsole" src="~/_controltemplates/DesignModeConsole.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="<% $Resources:wss,language_value%>" dir="<!$Resources:wss,multipages_direction_dir_value%>" runat="server" xmlns:o="urn:schemas-microsoft-com:office:office">
<head runat="server">
      <meta http-equiv="X-UA-Compatible" content="IE=8"/>
      <meta name="GENERATOR" content="Microsoft SharePoint"/>
      <meta name="progid" content="SharePoint.WebPartPage.Document"/>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
      <meta http-equiv="Expires" content="0">
      <SharePoint:RobotsMetaTag runat="server"/>
   
    <!-- This placeholder contains the title of the page. -->
      <title id="onetidTitle"><asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server"/></title>
   
      <SharePoint:CssLink runat="server" Version="4"/>
      <SharePoint:Theme runat="server"/>
      <SharePoint:ULSClientConfig runat="server"/>
   
    <!-- This script is used to tell other EcmaScript (JavaScript, JScript) elements that you are using a v4 master page. -->
      <script type="text/javascript">
      var _fV4UI = true;
      </script>
   
    <!-- This control is necessary to register the EcmaScript for many default controls to work. -->
      <SharePoint:ScriptLink language="javascript" name="core.js" OnDemand="true" runat="server"/>

    <!-- This control is used to retrieve and render the CustomJsUrl property from the SPWeb object. -->    
      <SharePoint:CustomJSUrl runat="server"/>
   
      <SharePoint:SoapDiscoveryLink runat="server"/>
   
    <!-- This control is used for extensibility to add controls to every page which inherits this masterpage. -->
      <SharePoint:DelegateControl runat="server" ControlId="AdditionalPageHead" AllowMultipleControls="true"/>
   
    <!-- This control is used to interact with EcmaScript (JavaScript, JScript) and the server object model. -->
      <SharePoint:SPPageManager runat="server"/>
   
    <!-- This control enables the help menus and tooltips on the Server ribbon. -->
      <SharePoint:SPHelpPageComponent Visible="false" runat="server"/>
   
      <!-- The following placeholders should always reside inside the head tag. -->
         <asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server"/>
    <asp:ContentPlaceHolder id="PlaceHolderBodyAreaClass" runat="server"/>
    <asp:ContentPlaceHolder id="PlaceHolderTitleAreaClass" runat="server"/>
   
</head>
<body scroll="no" onload="if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();" class="v4master">
    <form runat="server" onsubmit="if (typeof(_spFormOnSubmitWrapper) != 'undefined') {return _spFormOnSubmitWrapper();} else {return true;}">

        <!-- Some placeholders that reside inside the form tag.  Hidden from the UI but can be moved to a non-hidden location in the master page if there is a use in your design. -->
        <div class="ms-hide">
            <asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server" />
            <asp:ContentPlaceHolder id="PlaceHolderTopNavBar" runat="server" />
            <asp:ContentPlaceHolder id="PlaceHolderHorizontalNav" runat="server" />
            <asp:ContentPlaceHolder id="PlaceHolderSiteName" runat="server"/>
            <asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server" />
            <asp:ContentPlaceHolder id="PlaceHolderPageDescription" runat="server"/>
            <asp:ContentPlaceHolder id="PlaceHolderLeftNavBarDataSource" runat="server" />
            <asp:ContentPlaceHolder id="PlaceHolderCalendarNavigator" runat="server" />
            <asp:ContentPlaceHolder id="PlaceHolderLeftActions" runat="server" />
            <asp:ContentPlaceHolder id="PlaceHolderLeftNavBarTop" runat="server"/>
            <asp:ContentPlaceHolder id="PlaceHolderLeftNavBar" runat="server" />
            <asp:ContentPlaceHolder id="PlaceHolderQuickLaunchBottom" runat="server" />
            <!--<asp:ContentPlaceHolder id="PlaceHolderGlobalNavigation1" runat="server" /> -->
           <!--<asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb1" runat="server" /> -->
            <!--<asp:ContentPlaceHolder id="PlaceHolderGlobalNavigationSiteMap1" runat="server" Visible="false" />-->
            <asp:ContentPlaceHolder ID="SPNavigation" runat="server" >
                        <SharePoint:DelegateControl runat="server" ControlId="PublishingConsole"/>
            </asp:ContentPlaceHolder>
        </div>
        <!-- End placeholders that reside inside the form tag but are hidden. -->

        <asp:ScriptManager id="ScriptManager" runat="server" EnablePageMethods="false" EnablePartialRendering="true" EnableScriptGlobalization="false" EnableScriptLocalization="true" />
        <WebPartPages:SPWebPartManager id="m" runat="Server"/>
       
        <!-- This control shows an error to browsers that do not have EcmaScript (JavaScript, JScript) enabled. -->
        <SharePoint:SPNoScript runat="server"/>
       
        <!-- This div contains the Server ribbon including surrounding elements.  If you do not want a ribbon on any of your pages, you can remove most of this content. -->
        <div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle">
            <div id="s4-ribboncont">
                  <SharePoint:SPRibbon
                        runat="server"
                        PlaceholderElementId="RibbonContainer"
                        CssFile="">
                   
                    <!-- This section contains the content on the left side of the Server ribbon. -->
                    <!-- By default, this contains the Site Actions menu, Breadcrumb menu, and Edit buttons (omitted for simplicity - can be found on v4.master).  -->
                        <SharePoint:SPRibbonPeripheralContent
                              runat="server"
                              Location="TabRowLeft"
                              CssClass="ms-siteactionscontainer s4-notdlg">
                              <span class="ms-siteactionsmenu" id="siteactiontd">
                                 <SharePoint:SiteActions runat="server" accesskey="<%$Resources:wss,tb_SiteActions_AK%>" id="SiteActionsMenuMain"
                                    PrefixHtml=""
                                    SuffixHtml=""
                                    MenuNotVisibleHtml="&amp;nbsp;"
                                    >
                                    <CustomTemplate>
                                    <SharePoint:FeatureMenuTemplate runat="server"
                                          FeatureScope="Site"
                                          Location="Microsoft.SharePoint.StandardMenu"
                                          GroupId="SiteActions"
                                          UseShortId="true"
                                          >
                                          <SharePoint:MenuItemTemplate runat="server" id="MenuItem_EditPage"
                                                Text="<%$Resources:wss,siteactions_editpage%>"
                                                Description="<%$Resources:wss,siteactions_editpagedescriptionv4%>"
                                                ImageUrl="/_layouts/images/ActionsEditPage.png"
                                                MenuGroupId="100"
                                                Sequence="110"
                                                ClientOnClickNavigateUrl="javascript:ChangeLayoutMode(false);"
                                                />
                                          <SharePoint:MenuItemTemplate runat="server" id="MenuItem_TakeOffline"
                                                Text="<%$Resources:wss,siteactions_takeoffline%>"
                                                Description="<%$Resources:wss,siteactions_takeofflinedescription%>"
                                                ImageUrl="/_layouts/images/connecttospworkspace32.png"
                                                MenuGroupId="100"
                                                Sequence="120"
                                                />
                                          <SharePoint:MenuItemTemplate runat="server" id="MenuItem_CreatePage"
                                                Text="<%$Resources:wss,siteactions_createpage%>"
                                                Description="<%$Resources:wss,siteactions_createpagedesc%>"
                                                ImageUrl="/_layouts/images/NewContentPageHH.png"
                                                MenuGroupId="200"
                                                Sequence="210"
                                                UseShortId="true"
                                                ClientOnClickScriptContainingPrefixedUrl="if (LaunchCreateHandler('Page')) { OpenCreateWebPageDialog('~site/_layouts/createwebpage.aspx') }"
                                                PermissionsString="AddListItems, EditListItems"
                                                PermissionMode="All" />
                                          <SharePoint:MenuItemTemplate runat="server" id="MenuItem_CreateDocLib"
                                                Text="<%$Resources:wss,siteactions_createdoclib%>"
                                                Description="<%$Resources:wss,siteactions_createdoclibdesc%>"
                                                ImageUrl="/_layouts/images/NewDocLibHH.png"
                                                MenuGroupId="200"
                                                Sequence="220"
                                                UseShortId="true"
                                                ClientOnClickScriptContainingPrefixedUrl="if (LaunchCreateHandler('DocLib')) { GoToPage('~site/_layouts/new.aspx?FeatureId={00bfea71-e717-4e80-aa17-d0c71b360101}&amp;ListTemplate=101') }"
                                                PermissionsString="ManageLists"
                                                PermissionMode="Any"
                                                VisibilityFeatureId="00BFEA71-E717-4E80-AA17-D0C71B360101" />
                                          <SharePoint:MenuItemTemplate runat="server" id="MenuItem_CreateSite"
                                                Text="<%$Resources:wss,siteactions_createsite%>"
                                                Description="<%$Resources:wss,siteactions_createsitedesc%>"
                                                ImageUrl="/_layouts/images/newweb32.png"
                                                MenuGroupId="200"
                                                Sequence="230"
                                                UseShortId="true"
                                                ClientOnClickScriptContainingPrefixedUrl="if (LaunchCreateHandler('Site')) { STSNavigate('~site/_layouts/newsbweb.aspx') }"
                                                PermissionsString="ManageSubwebs,ViewFormPages"
                                                PermissionMode="All" />
                                          <SharePoint:MenuItemTemplate runat="server" id="MenuItem_Create"
                                                Text="<%$Resources:wss,siteactions_create%>"
                                                Description="<%$Resources:wss,siteactions_createdesc%>"
                                                MenuGroupId="200"
                                                Sequence="240"
                                                UseShortId="true"
                                                ClientOnClickScriptContainingPrefixedUrl="if (LaunchCreateHandler('All')) { STSNavigate('~site/_layouts/create.aspx') }"
                                                PermissionsString="ManageLists, ManageSubwebs"
                                                PermissionMode="Any" />
                                          <SharePoint:MenuItemTemplate runat="server" id="MenuItem_ViewAllSiteContents"
                                                Text="<%$Resources:wss,quiklnch_allcontent%>"
                                                Description="<%$Resources:wss,siteactions_allcontentdescription%>"
                                                ImageUrl="/_layouts/images/allcontent32.png"
                                                MenuGroupId="300"
                                                Sequence="302"
                                                UseShortId="true"
                                                ClientOnClickNavigateUrl="~site/_layouts/viewlsts.aspx"
                                                PermissionsString="ViewFormPages"
                                                PermissionMode="Any" />
                                           <SharePoint:MenuItemTemplate runat="server" id="MenuItem_EditSite"
                                                Text="<%$Resources:wss,siteactions_editsite%>"
                                                Description="<%$Resources:wss,siteactions_editsitedescription%>"
                                                ImageUrl="/_layouts/images/SharePointDesigner32.png"
                                                MenuGroupId="300"
                                                Sequence="304"
                                                UseShortId="true"
                                                ClientOnClickScriptContainingPrefixedUrl="EditInSPD('~site/',true);"
                                                PermissionsString="AddAndCustomizePages"
                                                PermissionMode="Any"
                                          />
                                          <SharePoint:MenuItemTemplate runat="server" id="MenuItem_SitePermissions"
                                                Text="<%$Resources:wss,people_sitepermissions%>"
                                                Description="<%$Resources:wss,siteactions_sitepermissiondescriptionv4%>"
                                                ImageUrl="/_layouts/images/Permissions32.png"
                                                MenuGroupId="300"
                                                Sequence="310"
                                                UseShortId="true"
                                                ClientOnClickNavigateUrl="~site/_layouts/user.aspx"
                                                PermissionsString="EnumeratePermissions"
                                                PermissionMode="Any" />
                                          <SharePoint:MenuItemTemplate runat="server" id="MenuItem_Settings"
                                                Text="<%$Resources:wss,settings_pagetitle%>"
                                                Description="<%$Resources:wss,siteactions_sitesettingsdescriptionv4%>"
                                                ImageUrl="/_layouts/images/settingsIcon.png"
                                                MenuGroupId="300"
                                                Sequence="320"
                                                UseShortId="true"
                                                ClientOnClickNavigateUrl="~site/_layouts/settings.aspx"
                                                PermissionsString="EnumeratePermissions,ManageWeb,ManageSubwebs,AddAndCustomizePages,ApplyThemeAndBorder,ManageAlerts,ManageLists,ViewUsageData"
                                                PermissionMode="Any" />
                                          <SharePoint:MenuItemTemplate runat="server" id="MenuItem_CommitNewUI"
                                                Text="<%$Resources:wss,siteactions_commitnewui%>"
                                                Description="<%$Resources:wss,siteactions_commitnewuidescription%>"
                                                ImageUrl="/_layouts/images/visualupgradehh.png"
                                                MenuGroupId="300"
                                                Sequence="330"
                                                UseShortId="true"
                                                ClientOnClickScriptContainingPrefixedUrl="GoToPage('~site/_layouts/prjsetng.aspx')"
                                                PermissionsString="ManageWeb"
                                                PermissionMode="Any"
                                                ShowOnlyIfUIVersionConfigurationEnabled="true" />
                                    </SharePoint:FeatureMenuTemplate>
                                    </CustomTemplate>
                                </SharePoint:SiteActions></span>
                        <asp:ContentPlaceHolder id="PlaceHolderGlobalNavigation" runat="server">
                                    <SharePoint:PopoutMenu
                                          runat="server"
                                          ID="GlobalBreadCrumbNavPopout"
                                          IconUrl="/_layouts/images/fgimg.png"
                                          IconAlt="<%$Resources:wss,master_breadcrumbIconAlt%>"
                                          IconOffsetX=0
                                          IconOffsetY=112
                                          IconWidth=16
                                          IconHeight=16
                                          AnchorCss="s4-breadcrumb-anchor"
                                          AnchorOpenCss="s4-breadcrumb-anchor-open"
                                          MenuCss="s4-breadcrumb-menu">
                                          <div class="s4-breadcrumb-top">
                                                <asp:Label runat="server" CssClass="s4-breadcrumb-header" Text="<%$Resources:wss,master_breadcrumbHeader%>" />
                                          </div>
                                          <asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" runat="server">
                                                <SharePoint:ListSiteMapPath
                                                      runat="server"
                                                      SiteMapProviders="SPSiteMapProvider,SPContentMapProvider"
                                                      RenderCurrentNodeAsLink="false"
                                                      PathSeparator=""
                                                      CssClass="s4-breadcrumb"
                                                      NodeStyle-CssClass="s4-breadcrumbNode"
                                                      CurrentNodeStyle-CssClass="s4-breadcrumbCurrentNode"
                                                      RootNodeStyle-CssClass="s4-breadcrumbRootNode"
                                                      NodeImageOffsetX=0
                                                      NodeImageOffsetY=353
                                                      NodeImageWidth=16
                                                      NodeImageHeight=16
                                                      NodeImageUrl="/_layouts/images/fgimg.png"
                                                      RTLNodeImageOffsetX=0
                                                      RTLNodeImageOffsetY=376
                                                      RTLNodeImageWidth=16
                                                      RTLNodeImageHeight=16
                                                      RTLNodeImageUrl="/_layouts/images/fgimg.png"
                                                      HideInteriorRootNodes="true"
                                                      SkipLinkText="" />
                                                </asp:ContentPlaceHolder>
                                    </SharePoint:PopoutMenu>
                                    <div class="s4-die">
                                          <asp:ContentPlaceHolder id="PlaceHolderGlobalNavigationSiteMap" runat="server" Visible="false">
                                          </asp:ContentPlaceHolder>
                                    </div>
                        </asp:ContentPlaceHolder>
                        <SharePoint:PageStateActionButton id="PageStateActionButton" runat="server" Visible="false" />
                        </SharePoint:SPRibbonPeripheralContent>
                   
                    <!-- This section contains the content on the right side of the Server ribbon. -->
                    <!-- By default, this contains the Developer Dashboard, Welcome Menu, and Social Networking (omitted for simplicity - can be found on v4.master). -->
                        <SharePoint:SPRibbonPeripheralContent
                              runat="server"
                              Location="TabRowRight"
                              ID="RibbonTabRowRight"
                              CssClass="s4-trc-container s4-notdlg">
                        </SharePoint:SPRibbonPeripheralContent>
                  </SharePoint:SPRibbon>
            </div>
           
            <!-- This div is used to display notifications on the page. -->
            <div id="notificationArea" class="s4-noti"></div>
           
            <!-- This div is used to display the Web Part adder. -->
            <div id="WebPartAdderUpdatePanelContainer">
                  <asp:UpdatePanel
                        ID="WebPartAdderUpdatePanel"
                        UpdateMode="Conditional"
                        ChildrenAsTriggers="false"
                        runat="server">
                        <ContentTemplate>
                                    <WebPartPages:WebPartAdder ID="WebPartAdder" runat="server" />
                              </ContentTemplate>
                        <Triggers>
                              <asp:PostBackTrigger ControlID="WebPartAdder" />
                        </Triggers>
                  </asp:UpdatePanel>
            </div>
        </div>
        <!-- Placeholders not visible in v4.master. -->
        <div class="ms-hide">
            <asp:ContentPlaceHolder id="PlaceHolderPageImage" runat="server" Visible="false"/>
            <asp:ContentPlaceHolder id="PlaceHolderTitleLeftBorder" runat="server" Visible="false" />
            <div id="onetidPageTitleAreaFrame" class='ms-pagetitleareaframe s4-pagetitle'></div>
            <asp:ContentPlaceHolder id="PlaceHolderMiniConsole" runat="server" Visible="false"/>
            <asp:ContentPlaceHolder id="PlaceHolderTitleRightMargin" runat="server" Visible="false"/>
            <asp:ContentPlaceHolder id="PlaceHolderTitleAreaSeparator" runat="server" Visible="false"/>
            <asp:ContentPlaceHolder id="PlaceHolderNavSpacer" runat="server" Visible="false" />
            <asp:ContentPlaceHolder id="PlaceHolderLeftNavBarBorder" runat="server" Visible="false" />
            <asp:ContentPlaceHolder id="PlaceHolderBodyLeftBorder" runat="server" Visible="false" />
            <asp:ContentPlaceHolder id="PlaceHolderBodyRightMargin" runat="server" />
        </div>
        <!-- End placeholders not visible in v4.master -->

        <div id="s4-workspace">
              <div id="s4-bodyContainer">
                    <div id="s4-titlerow" class="s4-pr s4-notdlg s4-titlerowhidetitle"></div>
               
                <!-- The following divs are used for the status area. -->
                    <div id="s4-statusbarcontainer">
                          <div id="pageStatusBar" class="s4-status-s1"></div>
                    </div>
               
                    <div id="s4-mainarea" class="s4-pr s4-widecontentarea">
                        
                    <!-- The MSO_ContentTable div must surround the content area. The id attribute is required. -->
                          <div class="s4-ca s4-ca-dlgNoRibbon" id="MSO_ContentTable">
                                <div class='s4-ba'>
                                    <div class='ms-bodyareacell'>
                                          <div id="MSO_ContentDiv" runat="server">
                                            <asp:ContentPlaceHolder id="PlaceHolderMain" runat="server"></asp:ContentPlaceHolder>
                                          </div>
                                    </div>
                                </div>
                          </div>
                    </div>
              </div>
        </div>
       
        <!-- The FormDigest control must be inside the PlaceHolderFormDigest placeholder. -->
        <asp:ContentPlaceHolder id="PlaceHolderFormDigest" runat="server">
                  <SharePoint:FormDigest runat="server"/>
        </asp:ContentPlaceHolder>
       
        <!-- These must be inside the form at the bottom in order to handle the back button functionality -->
        <input type="text" name="__spText1" title="text" style="display:none;" />
        <input type="text" name="__spText2" title="text" style="display:none;" />
       
    </form>
   
    <div id="ms-hide">
        <!-- This Placeholder must be outside the form but inside the body -->
        <asp:ContentPlaceHolder id="PlaceHolderUtilityContent" runat="server">
 
            </asp:ContentPlaceHolder>
    </div>
     
</body>
</html>



master.png
0
Comment
Question by:LuisEstebanValencia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 7

Expert Comment

by:AlMothanaAlOmari
ID: 34886111
is this page the default.master or other master page ,i think its not
0
 

Author Comment

by:LuisEstebanValencia
ID: 34886148
its not the default, its a starter masterpage from codeplex
0
 

Author Comment

by:LuisEstebanValencia
ID: 34886215
I dont know whats going on, but its always the same problem, using sharepoint designer I created a webpartpage, then I set that page as HOME, and after doing that, I got the error again.

I just want that my homepage to be a specific web part page layout, the default one does not work for me
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Expert Comment

by:AlMothanaAlOmari
ID: 34886219
so its inherit the width from the master page , i think you should change the default.master page or the core.css  
0
 

Author Comment

by:LuisEstebanValencia
ID: 34886258
I dont want to touch the core files from sharepoint, there must be another way
0
 
LVL 7

Accepted Solution

by:
AlMothanaAlOmari earned 500 total points
ID: 34886580
then you should create a copy from core.css change it as you want then link it to the required maser page only not to all pages
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
In case you ever have to remove a faulty web part from a page , add the following to the end of the page url ?contents=1
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question