Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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"/>
                                    </SharePoint:SPLinkButton>

                                    <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:Welcome>
                                             <wssuc:MUISelector ID="IdMuiSelectorx" runat="server"/>

                                        </div> 
                                        <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"/>
                                            </asp:ContentPlaceHolder>
                                        </div>
                            </div>  

                 <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">
                            <SharePoint:AspMenu
                              ID="TopNavigationMenuV4"
                              Runat="server"
                              EnableViewState="false"
                              DataSourceID="xmlSiteMap"
                              AccessKey="<%$Resources:wss,navigation_accesskey%>"
                              UseSimpleRendering="true"
                              UseSeparateCss="false"
                              Orientation="Horizontal"
                              StaticDisplayLevels="2"
                              MaximumDynamicDisplayLevels="2"
                              SkipLinkText=""                                 
                              CssClass = "s4-tn"/>

                               <asp:SiteMapDataSource
                                ShowStartingNode="true"
                                SiteMapProvider="CustomNavigationProvider"
                                id="xmlSiteMap"
                                runat="server"/>


                            <SharePoint:DelegateControl runat="server" ControlId="TopNavigationDataSource" Id="topNavigationDelegate">
                                <Template_Controls>
                                    <asp:SiteMapDataSource
                                      ShowStartingNode="False"
                                      SiteMapProvider="SPNavigationProvider"
                                      id="topSiteMap"
                                      runat="server"
                                      StartingNodeUrl="sid:1002"/>
                                </Template_Controls>
                            </SharePoint:DelegateControl>
                            </asp:ContentPlaceHolder>
                            </asp:ContentPlaceHolder>
                        </div>
                        <!-- Customization of Add Menu Ends here !-->
                    </div>  

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


                    <table class="s4-titletable" cellspacing="0" style="display:none">
                        <tbody>
                            <tr>
                                <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"/>
                                    </SharePoint:SPLinkButton>
                                </td>
                                <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>
                                        </asp:ContentPlaceHolder>
                                    </h1>
                                    <span id="onetidPageTitleSeparator" class="s4-nothome s4-bcsep s4-titlesep">
                                    <SharePoint:ClusteredDirectionalSeparatorArrow runat="server"/> </span>
                                    <h2>
                                        <asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server" />
                                    </h2>
                                    <div class="s4-pagedescription" tabindex="0" >
                                        <asp:ContentPlaceHolder id="PlaceHolderPageDescription" runat="server"/>
                                    </div>
                                </td>
                                <td class="s4-socialdata-notif">
                                    <SharePoint:DelegateControl ControlId="GlobalSiteLink3" Scope="Farm" runat="server"/>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
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

1 Answer 1

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

 
discard

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.