in

SharePoint University

Clean slate. Nothing but SharePoint.
Go, SharePoint!

Having a hard time figuring out the problem of extra white space at bottom of all pages.

Last post 07-16-2008 1:21 PM by carrerasc. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 04-10-2008 11:03 AM

    Having a hard time figuring out the problem of extra white space at bottom of all pages.

    I have searched high and low for a solution to this issue. I am using Heather Solomon's minimal master page and somehow all my pages render a huge amount of blank space and the bottom of the page. I have used IE Developer Toolbar to try and identify where the extra space is being created and found a couple of div's being rendered without ID's. Has anyone run into this or have a solution to try? Thanks for your time.

  • 04-10-2008 11:10 AM In reply to

    • thing
    • Top 75 Contributor
    • Joined on 01-25-2008

    Re: Having a hard time figuring out the problem of extra white space at bottom of all pages.

    I use the same blank page template and don't get any extra whitespace. I think you might need to send the code and the CSS you used.

  • 04-10-2008 2:45 PM In reply to

    Re: Having a hard time figuring out the problem of extra white space at bottom of all pages.

    Alright, here you go:

    Masterpage -

     <%-- Identifies this page as a .master page written in C# and registers tag prefixes, namespaces, assemblies, and controls. --%>
    <%@ Master language="C#" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@ Import Namespace="Microsoft.SharePoint" %>
    <%@ Register Tagprefix="SPSWC" Namespace="Microsoft.SharePoint.Portal.WebControls" Assembly="Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register TagPrefix="wssuc" TagName="Welcome" src="~/_controltemplates/Welcome.ascx" %>
    <%@ Register TagPrefix="wssuc" TagName="DesignModeConsole" src="~/_controltemplates/DesignModeConsole.ascx" %>
    <%@ Register TagPrefix="PublishingVariations" TagName="VariationsLabelMenu" src="~/_controltemplates/VariationsLabelMenu.ascx" %>
    <%@ Register Tagprefix="PublishingConsole" TagName="Console" src="~/_controltemplates/PublishingConsole.ascx" %>
    <%@ Register TagPrefix="PublishingSiteAction" TagName="SiteActionMenu" src="~/_controltemplates/PublishingActionMenu.ascx" %>
    <%-- Uses the Microsoft Office namespace and schema. --%>

    <html>
     <WebPartPages:SPWebPartManager runat="server"/>
     <SharePoint:RobotsMetaTag runat="server"/>

     <%-- The head section includes a content placeholder for the page title and links to CSS and ECMAScript (JScript, JavaScript) files that run on the server. --%>
     <head runat="server">
         <asp:ContentPlaceHolder runat="server" id="head">
       <title>Company - <asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server" /> </title>
         </asp:ContentPlaceHolder>
         <Sharepoint:CssLink runat="server"/>
         <asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server" >
     
      </asp:ContentPlaceHolder>
     
      <link rel="stylesheet" type="text/css" href="/Style%20Library/w2007d2v6.css"/>
      <link rel="stylesheet" type="text/css" href="/Style%20Library/mossOverrides.css"/>
      <link rel="stylesheet" type="text/css" href="/Style%20Library/CustomWebparts.css"/>
      <link rel="stylesheet" type="text/css" href="/Style%20Library/AspMenu-Top.css"/>

      <script type="text/javascript" runat="server">
          protected void OnProductsMenuItemDataBound(object sender, MenuEventArgs e)
          {
              if (e.Item != null)
              {
                  if (Request.Url.PathAndQuery == e.Item.NavigateUrl)
                  {
                     e.Item.Selected = true;
                  }
              }
          }
      </script>

     </head>
     
     <%-- When loading the body of the .master page, SharePoint Server 2007 also loads the SpBodyOnLoadWrapper class. This class handles .js calls for the master page. --%>
     <body onload="BLOCKED SCRIPT_spBodyOnLoadWrapper();">
      <body>
         <%-- The SPWebPartManager manages all of the Web part controls, functionality, and events that occur on a Web page. --%>
      <form runat="server" onsubmit="return _spFormOnSubmitWrapper();">
          <div class="bodybg">
        <div id="admin">
         <PublishingSiteAction:SiteActionMenu runat="server"/> 
         <PublishingWebControls:AuthoringContainer id="authoringcontrols" runat="server">
          <PublishingConsole:Console runat="server" />
         </PublishingWebControls:AuthoringContainer>
        </div>
        <div id="top"></div>
        <div id="container">
         <div id="searchbar">
          <a href="http://www.comapny.com" target="_parent">
          <img src="/sites/Test3/Style%20Library/Images/comapny/hometable_pixel.gif" alt="spacer" width="4" height="4" border="0" class="floatleft" /></a>
               <wssuc:Welcome id="explitLogout" runat="server"/>
                 <asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
           <SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox"/>
          </asp:ContentPlaceHolder>
         </div>
         <div id="graphicpromo">
            <div align="center">
            <asp:ContentPlaceHolder ID="PlaceHolderPageImage" runat="server"></asp:ContentPlaceHolder>
            </div>
         </div>
         <div id="navigation">
          <asp:ContentPlaceHolder id="PlaceHolderMainMenu" runat="server">
           <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false" StartingNodeOffset="1"/>
           <asp:Menu ID="TopNavigationMenu" runat="server"
            SkipLinkText="Skip Menu"
            Orientation="Horizontal"
            CssSelectorClass="MainMenu"
            StaticDisplayLevels="1"
            MaximumDynamicDisplayLevels="2"
            DataSourceID="SiteMapDataSource1"
            OnMenuItemDataBound="OnProductsMenuItemDataBound"/>
          </asp:ContentPlaceHolder>
         </div>
           <div id="content">
          <%-- The PlaceHolderMain content placeholder defines where to place the page content for all the content from the page layout. The page layout can overwrite any content placeholder from the master page. Example: The PlaceHolderLeftNavBar can overwrite the left navigation bar. --%>
          <asp:ContentPlaceHolder id="PlaceHolderMain" runat="server" >
          </asp:ContentPlaceHolder>
         </div>
          <div id="ab-breadcrumb">
          <asp:ContentPlaceHolder id="CombinedNavSiteMapProvider" runat="server">
           <asp:SiteMapPath ID="siteMapPath" Runat="server"
            SiteMapProvider="CurrentNavSiteMapProviderNoEncode"
            ParentLevelsDisplayed="3"
            PathSeparator=" :: "
            RenderCurrentNodeAsLink="false"
            CurrentNodeStyle-CssClass="breadcrumbCurrent"
            NodeStyle-CssClass="ms-sitemapdirectional">
            <RootNodeTemplate></RootNodeTemplate>
           </asp:SiteMapPath>
          </asp:ContentPlaceHolder>
         </div>
         <!--<br clear="all" />-->
         <div id="ab-footer" style="margin-top:5px;">
          <asp:ContentPlaceHolder ID="PlaceHolderPageFooter" runat="server"></asp:ContentPlaceHolder>
         </div>
        </div>
        <div id="bottom"></div>
        <div id="additional"></div>
       </div>
       <div style="display:none">
        <%-- These ContentPlaceHolders ensure all default SharePoint Server pages render with this master page. The only content placeholders required are those that are overridden by your page layouts. --%>
        <asp:Panel visible="false" runat="server">
         <asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea"  runat="server"/>
         <asp:ContentPlaceHolder id="PlaceHolderLeftNavBar" runat="server"/>
         <asp:ContentPlaceHolder ID="PlaceHolderBodyLeftBorder" runat="server"/>
         <asp:ContentPlaceHolder ID="PlaceHolderNavSpacer" runat="server"/>
         <asp:ContentPlaceHolder ID="PlaceHolderTitleLeftBorder" runat="server"/>
         <asp:ContentPlaceHolder ID="PlaceHolderTitleAreaSeparator" runat="server"/>
         <asp:ContentPlaceHolder ID="PlaceHolderMiniConsole" runat="server"/>
         <asp:ContentPlaceHolder id="PlaceHolderCalendarNavigator" runat ="server" />
         <asp:ContentPlaceHolder id="PlaceHolderLeftActions" runat ="server"/>
         <asp:ContentPlaceHolder id="PlaceHolderPageDescription" runat ="server"/>
         <asp:ContentPlaceHolder id="PlaceHolderBodyAreaClass" runat ="server"/>
         <asp:ContentPlaceHolder id="PlaceHolderTitleAreaClass" runat ="server"/>
         <asp:ContentPlaceHolder id="PlaceHolderBodyRightMargin" runat="server"/>
         <asp:ContentPlaceHolder id="PlaceHolderTitleRightMargin" runat="server"/>
        </asp:Panel>
       </div>
      </form>
     </body>
    </html>

    There is a lot of CSS so I won't post that until needed, but when a page is rendered, any page, it renders with xtra div's and javascripts between my last div and the closing form tag. the div with the "display:none" contained the asp:Panel tag and ContentPlaceHolder's:

        <div style="display:none">
        
        
       </div>
      
    <div>

     <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWBAL1vN50AqmflsILAo3/oIMGAuDxlrYFYTcLuT8R4/TH+UyVnMCICXftD/c=" />
    </div>

    <script type="text/javascript">
    <!--
    var __wpmExportWarning='This Web Part Page has been personalized. As a result, one or more Web Part properties may contain confidential information. Make sure the properties contain information that is safe for others to read. After exporting this Web Part, view properties in the Web Part description file (.WebPart) by using a text editor such as Microsoft Notepad.';var __wpmCloseProviderWarning='You are about to close this Web Part.  It is currently providing data to other Web Parts, and these connections will be deleted if this Web Part is closed.  To close this Web Part, click OK.  To keep this Web Part, click Cancel.';var __wpmDeleteWarning='You are about to permanently delete this Web Part.  Are you sure you want to do this?  To delete this Web Part, click OK.  To keep this Web Part, click Cancel.';// -->
    </script>

    <script type="text/javascript" language="JavaScript" defer>
    <!--
    function S6AE27B38_Submit() {GoSearch(null,'ctl00_PlaceHolderSearchArea_ctl01_S6AE27B38_InputKeywords',null,true,true,'ctl00_PlaceHolderSearchArea_ctl01_SBScopesDDL','ctl00_PlaceHolderSearchArea_ctl01_ctl00',null,null,'\u002fsearchcenter\u002fPages\u002fResults.aspx', 'This Site','This List', 'This Folder', 'Related Sites', '\u002fen_US\u002fcareers\u002fyou\u002f_layouts\u002fOSSSearchResults.aspx');}
    // -->
    </script>

    <script type="text/javascript" language="JavaScript" >
    // append an onload event handler
    var S6AE27B38__onload= document.body.onload;
    if(typeof document.body.onload == 'function')
    {
     document.body.onload = function()
     {
    S6AE27B38__onload();       
      document.getElementById('ctl00_PlaceHolderSearchArea_ctl01_S6AE27B38_InputKeywords').name = 'InputKeywords';
     }
    }
    else
    {
     document.body.onload = function()
     {
      eval(S6AE27B38__onload);       
      document.getElementById('ctl00_PlaceHolderSearchArea_ctl01_S6AE27B38_InputKeywords').name = 'InputKeywords';
     }
    }

    function S6AE27B38_OSBEK(event1) {
    var kCode = String.fromCharCode(event1.keyCode);
    if(kCode == "\n" || kCode == "\r")
    {  
    S6AE27B38_Submit();
    }
    }
    // -->
    </script>

    <SCRIPT LANGUAGE='JavaScript' >
    <!--
    WPSC.Init(document);
    var varPartWPQ2 = WPSC.WebPartPage.Parts.Register('WPQ2','c61f24f1-d3af-4c77-9022-f1a52dcf7bec',document.all.item('WebPartWPQ2'));
    var varPartWPQ4 = WPSC.WebPartPage.Parts.Register('WPQ4','59e36879-5475-44e2-8af4-b7f460258d6b',document.all.item('WebPartWPQ4'));
    var varPartWPQ1 = WPSC.WebPartPage.Parts.Register('WPQ1','00000000-0000-0000-0000-000000000000',document.all.item('WebPartWPQ1'));
    WPSC.WebPartPage.WebURL = 'http:\u002f\u002fcompany.mosshosting.com\u002fen_US\u002fcareers\u002fyou';
    WPSC.WebPartPage.WebServerRelativeURL = '\u002fen_US\u002fcareers\u002fyou';

    //-->
    </SCRIPT>

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

    Thanks for the response and please let me know what you think. The only thing I found through Googling was that the javascitpts actuall generate carriage returns hence the black space. If that's the case, I don't know how to "disable" that.

     

     

  • 04-11-2008 1:40 PM In reply to

    • thing
    • Top 75 Contributor
    • Joined on 01-25-2008

    Re: Having a hard time figuring out the problem of extra white space at bottom of all pages.

    Ok, I'm really good at HTML and CSS and competent in ASP and XSLT, however, the masterpage added to my site gets me an error message that I can't have code blocks in the masterpage. What can I remove without breaking the page?

    On a separate note: I sometimes take my divs and add a style="border: 1px solid red" and then change the colour for each div, ie. one red, one blue etc. when you render the page - the divs should have borders around them so you can pick out the offending ones.

  • 07-16-2008 1:21 PM In reply to

    Re: Having a hard time figuring out the problem of extra white space at bottom of all pages.

    I found it! I was using the CSS Friendly Control Adapters for my main navigation. With three levels of sites in my site collection and only showing two levels in the menu (Through CSS of course), The extra space was generated from the third level of menu rendered.

Page 1 of 1 (5 items)

Need SharePoint Training? Attend a SharePoint Bootcamp!
Forum content (c) original posters. Everything else (c) 2008 SharePoint Experts, Inc.