.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> SharePoint >> Post New QuestionBookmark and Share Subscribe to Forum

Setting footer of sharepoint master page at the bottom irrespective of IE version

Posted By: Aruna     Posted Date: November 10, 2010    Points:2   Category :SharePoint
The page is looking fine in IE6 but in IE7 the footer is displaying in the middle of the page and looks very awkward. is there any way to fix it at the bottom?
Below is my master page code:


<%@ 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="WpNs0" 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" %>
<html dir="<%$Resources:wss, multipages_direction_dir_value %>" runat="server" __expr-val-dir="ltr">
<head runat="server">
<meta name="GENERATOR" content="Microsoft SharePoint">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Expires" content="0">
<SharePoint:RobotsMetaTag runat="server"/>
<title id="onetidTitle"> <asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server"/> </title>
<Sharepoint:CssLink runat="server"/>
<!--Styles used for positioning, font and spacing definitions-->
<SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/Style Library/~language/Core Styles/Band.css%>" runat="server"/>
<SharePoint:CssRegistration name="<% $SPUrl:~sitecollection/Style Library/~language/Core Styles/controls.css %>" runat="server"/>
<SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/Style Library/zz1_blue.css%>" runat="server"/>
<SharePoint:ScriptLink name="init.js" runat="server"/>
<!--Placeholder for additional overrides-->
<asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server"/>
<style type="text/css">
.decolink { font-family: Trebuchet MS; font-size:11px; font-weight:bold; color:#330066; padding:2px }
a.decolink:link { text-decoration:none;}
a.decolink:visited { text-decoration:none;}
a.decolink:hover { text-decoration:underline; color:#990000}
a.decolink:active { text-decoration:none;}
.footer {font-family: Trebuchet MS; font-size:10px; color:#666666; text-align:center;}
.footer1 {
background: #d4d7d8; font-size:12px; color:#014275;
clear: both;
width: 100%;
padding: 3px;




}

.topNavContainer
{
background-image: url('/Style Library/Images/menusbkg.gif');
background-repeat: repeat-x;
}
.body
{
background-image: url('/Style Library/Images/body_bg.jpg');
background-repeat: repeat-x; background-color: #e5e5db;
height:100%;
margin:0px;
}
.master
{
width:1000px;
margin-left:auto;
margin-right:auto;
height:100%;
background-color:#FFFFFF;
}


.shadowRight
{
*height:100%;
min-height:100%;
width:12px;
background-image: url('/Style Library/Images/body_bg.jpg');
background-repeat: repeat-x; background-color: #e5e5db;
background-position:left top;
}

.shadowLeft
{
*height:100%;
min-height:100%;
width:0px;
background-image: url('/Style Library/Images/body_bg.jpg');
background-repeat: repeat-x; background-color: #e5e5db;
background-position:left top;
}

.text_blue {
font-size:12px; color:#014275;
}

</style>
<meta name="Microsoft Theme" content="Obsidian 1011, default">
</head>
<body class="body" onload="javascript:_spBodyOnLoadWrapper();">
<form runat="server" onsubmit="return _spFormOnSubmitWrapper();">
<WebPartPages:SPWebPartManager runat="server"/>
<table cellpadding="0" cellspacing="0" class="master">
<tr>
<!-- <td height="100%" class="shadowLeft">
<div class="spacer">
</div>
</td> -->
<td valign="top">
<table cellpadding="0" cellspacing="0" width="1000px" class="masterContent">
<tr style="height:0px"><td style="width: 286px">
<wssuc:DesignModeConsole id="IdDesignModeConsole" runat="server"/></td></tr>
<tr>
<td colspan="2" class="authoringRegion">
<span class="siteActionMenu">
<PublishingSiteAction:SiteActionMenu runat="server"/>
</span>
<div class="sharepointLogin">
<!--Authentication for Authors only-->
<table cellpadding="0" cellspacing="0" >
<tr>
<td class="ms-globallinks">
<SharePoint:DelegateControl ControlId="GlobalSiteLink1" Scope="Farm" runat="server" Visible="False"/></td>
<td class="ms-globallinks">
<SharePoint:DelegateControl ControlId="GlobalSiteLink2" Scope="Farm" runat="server" Visible="False"/></td>
<td class="ms-globallinks">
<wssuc:Welcome id="explitLogout" runat="server"/></td>
</tr>
</table>
</div>
<div class="console">
<PublishingConsole:Console runat="server"/>
</div>
</td>
</tr>
<tr>
<td colspan="2" >
<table background="/images/bg_top.jpg" border="0">

<tr >
<td width="160" rowspan="2" align="right"

valign="top"> <img src="/images/inside_lntlogo.jpg" width="145"

height="120">

<SharePoint:AspMenu ID="logoLinkId" runat="server" DataSourceID="SiteMapDataSourceRoot" StaticDisplayLevels="1" MaximumDynamicDisplayLevels="0"
AccessKey="1" CssClass="logo" style="background-image:'/Style Library/Images/Logo.jpg'" visible="false"/>
<PublishingNavigation:PortalSiteMapDataSource ID="SiteMapDataSourceRoot" Runat="server"
SiteMapProvider="CombinedNavSiteMapProvider" EnableViewState="true"
StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="true"/>
<div class="shadowRight">
<div class="topLink">
<PublishingVariations:VariationsLabelMenu id="labelmenu1" runat="server"/>
</div>
</div> </td>



<td align="center" valign="top" style="height: 76px">
<img

src="/images/bg_top_new.jpg" width="612" height="100"></td>
<td width="210" align="left" style="height: 76px"><img

src="/images/inside_greymatterlogo.jpg" width="193"

height="100"></td>
</tr>
<tr>
<td colspan="2" align="right"

valign="top"><table width="90%" border="0" cellspacing="0"

cellpadding="0">
<tr>
<td width="80" align="left"

valign="top"><img src="/images/navbg_shape.jpg" width="80"

height="30"></td>
<td align="center" valign="middle"

background="/images/navbg.jpg" class="text_blue">
<table

border="0" cellspacing="0" cellpadding="0">
<tr>

<td valign="top" align="left" style="width: 68%" height="30px">
<PublishingNavigation:PortalSiteMapDataSource ID="siteMapDataSource1" Runat="server"
SiteMapProvider="CombinedNavSiteMapProvider" EnableViewState="true"
StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="false"
TreatStartingNodeAsCurrent="true" TrimNonCurrentTypes="Heading"/>
<SharePoint:AspMenu ID="GlobalNav" Runat="server" DataSourceID="SiteMapDataSource1"
Orientation="Horizontal" StaticDisplayLevels="1" MaximumDynamicDisplayLevels="1"
StaticSubMenuIndent="0" DynamicHorizontalOffset="0" DynamicVerticalOffset="-8"
StaticEnableDefaultPopOutImage="false" ItemWrap="false" SkipLinkText="<%$Resources:cms,masterpages_skiplinktext%>" CssClass="topNav" Height="22px">
<StaticMenuItemStyle CssClass="topNavItem" ItemSpacing="5px"/>
<StaticSelectedStyle ItemSpacing="5px" CssClass="topNavSelected" />
<StaticHoverStyle CssClass="topNavHover"/>
<DynamicMenuStyle CssClass="topNavFlyOuts" />
<DynamicMenuItemStyle CssClass="topNavFlyOutsItem" />
<DynamicHoverStyle CssClass="topNavFlyOutsHover"/>
</SharePoint:AspMenu>
</td>






<td align="center" valign="middle"

background="/images/navbg.jpg" class="text_blue">
<div class="search" style="width: 137px">
<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">

<WpNs0:SearchBoxEx runat="server" __MarkupType="xmlmarkup" WebPart="true" __WebPartId="{5E18C8C5-DCE7-487C-BCDF-3BD39A38BF16}">
<WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/WebPart/v2">
<Title></Title>
<FrameType>None</FrameType>
<Description>Used to search document and items.</Description>
<IsIncluded>true</IsIncluded>
<ZoneID>TopZone</ZoneID>
<PartOrder>1</PartOrder>
<FrameState>Normal</FrameState>
<Height />
<Width>120px</Width>
<AllowRemove>true</AllowRemove>
<AllowZoneChange>true</AllowZoneChange>
<AllowMinimize>true</AllowMinimize>
<AllowConnect>true</AllowConnect>
<AllowEdit>true</AllowEdit>
<AllowHide>true</AllowHide>
<IsVisible>true</IsVisible>
<DetailLink />
<HelpLink />
<HelpMode>Modeless</HelpMode>
<Dir>Default</Dir>
<PartImageSmall />
<MissingAssembly>Cannot import this Web Part.</MissingAssembly>
<PartImageLarge />
<IsIncludedFilter />
<ExportControlledProperties>true</ExportControlledProperties>
<ConnectionID>00000000-0000-0000-0000-000000000000</ConnectionID>
<ID>g_5e18c8c5_dce7_487c_bcdf_3bd39a38bf16</ID>
<DropDownModeEx xmlns="urn:schemas-microsoft-com:SearchBoxEx">HideScopeDD</DropDownModeEx>
<TextBoxWidth xmlns="urn:schemas-microsoft-com:SearchBoxEx">100</TextBoxWidth>
<ShowAdvancedSearch xmlns="urn:schemas-microsoft-com:SearchBoxEx">false</ShowAdvancedSearch>
<GoImageUrl xmlns="urn:schemas-microsoft-com:SearchBoxEx">/Style Library/Images/Search_Arrow.jpg</GoImageUrl>
<GoImageActiveUrl xmlns="urn:schemas-microsoft-com:SearchBoxEx">/Style Library/Images/Search_Arrow.jpg</GoImageActiveUrl>
<GoImageUrlRTL xmlns="urn:schemas-microsoft-com:SearchBoxEx">/Style Library/Images/Search_Arrow.jpg</GoImageUrlRTL>
<GoImageActiveUrlRTL xmlns="urn:schemas-microsoft-com:SearchBoxEx">/_layouts/images/goRTL.gif</GoImageActiveUrlRTL>
<AdvancedSearchPageURL xmlns="urn:schemas-microsoft-com:SearchBoxEx">/Search/advanced.aspx</AdvancedSearchPageURL>
<SearchResultPageURL xmlns="urn:schemas-microsoft-com:SearchBoxEx">/Search/results.aspx</SearchResultPageURL>
<ScopeDisplayGroupName xmlns="urn:schemas-microsoft-com:SearchBoxEx">Search Dropdown</ScopeDisplayGroupName>
<RegisterStyles xmlns="urn:schemas-microsoft-com:SearchBoxEx">true</RegisterStyles>
<ShouldTakeFocusIfEmpty xmlns="urn:schemas-microsoft-com:SearchBoxEx">true</ShouldTakeFocusIfEmpty>
</WebPart>
</WpNs0:SearchBoxEx>

</asp:ContentPlaceHolder>
</div>
</td>




</tr>
</table></td>
</tr>
</table>

</td>
</tr>
</table>
<tr>
<td colspan="2">
<table cellpadding="0" cellspacing="0" width="1000px">
<tr>
<td width="100%">
<asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" runat="server">
<div class="breadcrumb">
<asp:SiteMapPath ID="siteMapPath" Runat="server" SiteMapProvider="CurrentNavSiteMapProviderNoEncode"
RenderCurrentNodeAsLink="false" CurrentNodeStyle-CssClass="breadcrumbCurrent" NodeStyle-CssClass="ms-sitemapdirectional"/>
</div>
</asp:ContentPlaceHolder>
</td>
<td>
<asp:ContentPlaceHolder ID="PlaceHolderMiniConsole" runat="server" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" style="width: 286px">
<asp:ContentPlaceHolder id="PlaceHolderCalendarNavigator" runat ="server" />
<asp:ContentPlaceHolder id="PlaceHolderLeftNavBarTop" runat="server" >
<p>
&nbsp;
<img alt="Pos" src="/images/img_pmr.jpg"></p>
</asp:ContentPlaceHolder>
<asp:ContentPlaceHolder id="PlaceHolderLeftNavBar" runat="server" Visible="false">
<!-- Current Navigation -->
<SharePoint:AspMenu ID="CurrentNav" runat="server" datasourceID="SiteMapDS" orientation="Vertical"
StaticDisplayLevels="2" MaximumDynamicDisplayLevels="0" StaticSubMenuIndent="1" ItemWrap="true" AccessKey="3" CssClass="leftNav" SkipLinkText="<%$Resources:cms,masterpages_skiplinktext%>">
<LevelMenuItemStyles>
<asp:MenuItemStyle CssClass="leftNav1" />
<asp:MenuItemStyle CssClass="leftNav2" />
<asp:MenuItemStyle CssClass="leftNav3" />
</LevelMenuItemStyles>
<StaticHoverStyle CssClass="leftNavHover"/>
<StaticSelectedStyle CssClass="leftNavSelected"/>
<DynamicMenuStyle CssClass="leftNavFlyOuts" />
<DynamicMenuItemStyle CssClass="leftNavFlyOutsItem"/>
<DynamicHoverStyle CssClass="leftNavFlyOutsHover"/>
</SharePoint:AspMenu>
<PublishingNavigation:PortalSiteMapDataSource ID="SiteMapDS" Runat="server"
SiteMapProvider="CurrentNavSiteMapProvider" EnableViewState="true"
StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="false"
TrimNonCurrentTypes="Heading"/>
</asp:ContentPlaceHolder>
<!--
<img style="padding-left:10px; padding-right:2px;" src="/Style Library/Images/Positioning.gif" alt="L&T Infotech Positioning Statement"/>
-->
<asp:ContentPlaceHolder id="PlaceHolderLeftActions" runat ="server" />
<asp:ContentPlaceHolder id="PlaceHolderNavSpacer" runat="server">
<div class="leftNavSpacer"/>
</asp:ContentPlaceHolder>
</td>
<td width="700px" valign="top">
<div class="mainContainer" id="MSO_ContentDiv" runat="server">
<div class="pageTitle">
<asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server" />
</div>
<div class="mainContent" style="min-height:590px;">
<asp:ContentPlaceHolder id="PlaceHolderMain" runat="server" />
</div>
</div>
</td>
</tr>




</td>
</tr>

</table>
</td>
</tr>
</table>
<asp:panel visible="false" runat="server" CssClass="body">
<asp:ContentPlaceHolder ID="PlaceHolderPageImage" runat="server" />
<asp:ContentPlaceHolder ID="PlaceHolderBodyLeftBorder" runat="server" />
<asp:ContentPlaceHolder ID="PlaceHolderTitleLeftBorder" runat="server" />
<asp:ContentPlaceHolder ID="PlaceHolderTitleAreaSeparator" runat="server" />
<asp:ContentPlaceHolder ID="OSSConsole" runat="server" />
<asp:ContentPlaceHolder ID="PlaceHolderTitleRightMargin" 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:panel>

</form>


<!--<table width="1000px" border="0" cellspacing="0" cellpadding="0" style="position:absolute;vertical-align:bottom;table-layout:auto">
<tr>
<td width="80%" height="18" class="footer1" align="left">Copyright © 2010 Resource management, Larsen &amp; Toubro Infotech Ltd.</td>
<td align="right" class="footer1"><a href="/Lists/Feedback/Newform.aspx">Feedback</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="/Pages/Contact_Us.aspx">Contact Us</a>&nbsp;&nbsp;&nbsp;</td>
</tr> </table>!-->
<div class="footer1" style="width:1000px;">Copyright © 2010 aaa, company Ltd.<a href="/Lists/Feedback/111.aspx">Feedback</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="/Pages/Contact_Us.aspx">Contact Us</a>&nbsp;&nbsp;&nbsp;</div>
</body>
</html>


Responses
Author: Sadhuryan             
Posted Date: November 11, 2010     Points: 5   

There is a trick to overcome it!


put this code, before ur footer div

<BR/>
<BR/>
<BR/>
<BR/>
<BR/>



it will brings a level down. Coz, you can't test all type of browsers and all of its versions. Then your code will exceeds in size. But this will suits for all browser, isn't it..?

Author: Aruna             
Posted Date: November 11, 2010     Points: 5   

Thanks a lot sadhuryan:):)
it worked.
One more question......
the page is scrolling even the content is less....means...unnecessary white spaces after the footer in some pages....for pages with more content it s fine.....
how to overcome that?
sorry if my question s blumnt

Author: Sadhuryan             
Posted Date: November 11, 2010     Points: 5   

try changing the body class in your css code:

.body
{
background-image: url('/Style Library/Images/body_bg.jpg');
background-repeat: repeat-x; background-color: #e5e5db;
height:100%;
margin:0px;
}


to

body
{
background: #e5e5db url('/Style Library/Images/body_bg.jpg') repeat-x;
margin: 0px;
}


and change

<body class="body" onload="javascript:_spBodyOnLoadWrapper();">


as

<body onload="javascript:_spBodyOnLoadWrapper();">


Author: Sadhuryan             
Posted Date: November 11, 2010     Points: 5   

did that worked..?

Author: Aruna             
Posted Date: November 14, 2010     Points: 5   

Hi sadhuryan....
Thanks a lot:):)
It worked perfectly:)
one more question.....
Now the footer is perfect in IE7(page scrolls unnecessarily even if the content is less)....but in IE6 it appears in the middle..
Is there any solution to make the footer appear at the bottom irrespective of IE version.
Awaiting for ur response.

Author: Aruna             
Posted Date: November 14, 2010     Points: 5   

Hi sadhuryan....
Thanks a lot:):)
It worked perfectly:)
one more question.....
Now the footer is perfect in IE7(page scrolls unnecessarily even if the content is less)....but in IE6 it appears in the middle..
Is there any solution to make the footer appear at the bottom irrespective of IE version.
Awaiting for ur response.

Author: Aruna             
Posted Date: November 14, 2010     Points: 5   

Hi sadhuryan....
Thanks a lot:):)
It worked perfectly:)
one more question.....
Now the footer is perfect in IE7(page scrolls unnecessarily even if the content is less)....but in IE6 it appears in the middle..
Is there any solution to make the footer appear at the bottom irrespective of IE version.
Awaiting for ur response.



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend