SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have developed a masterpage and the homepage appearing perfect when we use IE8/IE9 but there alignment problem in IE7. I am attaching screenshot of both IE7 and IE8. plz suggest why the DIV's are stretching ..

 IE7 Result

enter image description here

 IE8 and above Result

enter image description here

<div id="s4-workspace">
    <div id="s4-bodyContainer">
        <div id="s4-titlerow" class="s4-pr s4-notdlg s4-titlerowhidetitle">
            <div class="s4-title s4-lp">
                <div class="s4-title-inner">

                    <!-- Customization starts here to remove default table based style and prevent rendering of not needed components !-->
                        <!-- Add Logo !-->
               <div class="s4-titlelogo">
                                    <SharePoint:SPLinkButton runat="server" NavigateUrl="~site/" id="samx_onetidProjectPropertyTitleGraphic">
                                        <SharePoint:SiteLogoImage name="onetidHeadbnnr0" id="samx_onetidHeadbnnr2" LogoImageUrl="/Style%20Library/Images/Home.jpg" runat="server"/>

                                    <div id="secondz" style="margin-top:-14px; margin-left :790px; width:192px"> 
                                        <div id="child1"  style="font-weight:bold; color:white; text-align:right">
                                                <wssuc:Welcome id="IdWelcomex" runat="server" EnableViewState="false">
                                             <wssuc:MUISelector ID="IdMuiSelectorx" runat="server"/>

                                        <div id="thirdz" style="margin-top:2px;margin-left:-30px; width:100px">                                             
                                            <asp:ContentPlaceHolder id="samx_PlaceHolderSearchArea" runat="server">
                                                <SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" Version="4"/>

                 <div id="NavmenuDiv" style="margin-top:-38px; margin-left :200px; width:200px"> 
                 <div class="s4-lp s4-toplinks">
                    <asp:ContentPlaceHolder id="PlaceHolderTopNavBar" runat="server">
                            <asp:ContentPlaceHolder id="PlaceHolderHorizontalNav" runat="server">
                              CssClass = "s4-tn"/>


                            <SharePoint:DelegateControl runat="server" ControlId="TopNavigationDataSource" Id="topNavigationDelegate">
                        <!-- Customization of Add Menu Ends here !-->

                  </div>  <!-- End of s4-titlelogo !-->

                    <table class="s4-titletable" cellspacing="0" style="display:none">
                                <td class="s4-titlelogo">
                                    <SharePoint:SPLinkButton runat="server" NavigateUrl="~site/" id="onetidProjectPropertyTitleGraphic">
                                        <SharePoint:SiteLogoImage name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/images/siteIcon.png" runat="server"/>
                                <td class="s4-titletext">
                                    <h1 name="onetidProjectPropertyTitle">
                                        <asp:ContentPlaceHolder id="PlaceHolderSiteName" runat="server">
                                            <SharePoint:SPLinkButton runat="server" NavigateUrl="~site/" id="onetidProjectPropertyTitle"><SharePoint:ProjectProperty Property="Title" runat="server" /></SharePoint:SPLinkButton>
                                    <span id="onetidPageTitleSeparator" class="s4-nothome s4-bcsep s4-titlesep">
                                    <SharePoint:ClusteredDirectionalSeparatorArrow runat="server"/> </span>
                                        <asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server" />
                                    <div class="s4-pagedescription" tabindex="0" >
                                        <asp:ContentPlaceHolder id="PlaceHolderPageDescription" runat="server"/>
                                <td class="s4-socialdata-notif">
                                    <SharePoint:DelegateControl ControlId="GlobalSiteLink3" Scope="Farm" runat="server"/>
share|improve this question
Can you please post the CSS to this, so we can see what we are dealing with? Thank you – Daniel Ziga Feb 2 '12 at 7:52
have a look my customization and i am using inline css..the rest is normal CoreV4.css – Mehwish Feb 2 '12 at 8:05
Just to verify, you do have a DocType listed at the top of your page, correct? IE does a lot of funky things if it is missing. – Dave Wise Feb 2 '12 at 23:14

I believe there are several <div> tags that needs to be closed at the end of your code that you have posted. These additional <div> tags that are not closed, can cause issues in IE7 particulary whereas IE8 and above would be able to resolve it.

You can always view whats happening behind the scenes using IE developer toolbar, which helps you identify which div tags are mismatching. It comes by default on IE8 and you will have to install the same for IE7.

If some styling or css are not performing the way it should be performing for particular IE versions, you can always think about different CSS hacks.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.