In IE11, the entire document can be scrolled through, while this functionality is not

I have a unique challenge with an HTML page that is generated from two different frameworks. Due to the constraints of these frameworks, I can't make extensive modifications to the code itself. However, I do have the flexibility to manipulate the HTML using jQuery. The setup involves an application with a header and another reporting application that includes a subheader, content, and footer sections. My goal is to ensure that the document takes up the full viewport height, with the footer fixed at the bottom. Additionally, I need the content div to adjust its size dynamically, expanding or contracting as necessary, and enabling overflow so that scrolling is possible if the content exceeds the div's dimensions. While this solution works well in Chrome, I'm encountering issues with Internet Explorer where the document displays an additional scrollbar along with the expected one within the content frame.

Any assistance or guidance on resolving this issue would be greatly appreciated.

Check out the jsfiddle example here.

Code:

<body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0">
    <div style="width:100%;height:125px;background-color:#FFC;"></div>
</body>

<FORM NAME="rdForm" method="POST">
    <MainBody>
        <DIV id="divOuterContainer" CLASS="NF_display_table_container">
            <DIV id="divHeader" CLASS="NF_top">
                 <SPAN>My SubHeader</SPAN>
            </DIV>
            <DIV id="divContentContainer">
                <DIV id="divContent">
                    <DIV id="divInteractive" CLASS="NF_body2">
                        <div style="width:100%;height:1200px;background-color:#FCC;">
                        </div>
                    </DIV>
                </DIV>
             </DIV>
         <DIV id="divFooter" CLASS="NF_bottom2">
             <SPAN>My Footer
             </SPAN>
         </DIV>
       </DIV>
        </MainBody></FORM>

Javascript:

function reflow() {
    var wsize = $(window).height();
    var headers = $("#divContent").position().top;
    var my_footer = $("#divFooter").height();

    var new_height = Math.ceil(wsize - (headers + my_footer));


    $("#divContent").css('height', new_height);
    $("#divInteractive").css('height', new_height);


}
$(document).ready(

function () {
    // Run immediately on DOM ready…
    reflow();
    // And again on page load and resize events
    $(window).bind("load resize", reflow);
}

);

CSS Styles:

.hide {
    display: none;
}
.NF_body2 {
    overflow: auto;
}
.NF_top {
    background-color:#CFF;
}
.NF_bottom2 {
    background-color:#CFF;
}
.NF_container2 {
    position: relative;
}

Answer №1

It appears that you may have overlooked the -ms-overflow-style property in your CSS code. Consider adding the following:

    .NF_body2 {
    overflow: auto;
    -ms-overflow-style: auto;
}

If you find the need to include this property elsewhere, simply follow the same pattern. For further information on this topic, you can refer to this resource!

Answer №2

You should consider using overflow: hidden on the body tag instead

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Combining Different Fonts in a Single CSS File

Is there a way to incorporate multiple fonts in a CSS file? I attempted the following method, but it's not producing the desired outcome. @font-face { font-family: 'Inspira_Reg'; src: url('http://myfonturl.com'); } @font- ...

Ensuring that your content expands to fit the sidebar dimensions

I have diligently searched for a solution to my issue both on Google and here, but have yet to find one that works. I've experimented with various CSS properties like display: table-cell and inline-block, as well as different overflow options, but not ...

parsedhtml is no longer providing responses

Hello, I am facing an issue while trying to extract text from a website using powershell. Whenever I attempt to return an object with ParsedHtml, powershell becomes unresponsive (even after letting it run in the background for some time). What could be cau ...

NetSuite: Excessive data causes HTML template table to be truncated

When it comes to our item fulfilments, we often encounter a situation where there are hundreds of serial numbers in the inventory detail. These serial numbers are listed when the fulfilment is printed, but unfortunately they only appear on the first page ...

Utilize magnific popup to display a vimeo video seamlessly

I have been working on developing a website using Bootstrap and the one-page template called Family/Forest from themeforest.net. In order to customize the portfolio section of this template, I modified it to display a video popup when a thumbnail is clicke ...

Retrieving cascading values in a dropdownlist using Asp .NET MVC

In my current project, I am using Asp.Net MVC4. In a form, I have implemented cascading dropdown lists. When I select "Distrito" in one dropdown list, it correctly loads the corresponding values for "Sucursal". The insertion of records works fine. However, ...

Hide/Show overflow causing a disruption in my perspective

I am puzzled as to why my paragraph is not starting on a new line despite the overflow property set on the previous element. Take a look at my plunker, adjust the overflow property in line 11 to hidden and it will display correctly. When set to visible, i ...

Utilizing a large logo alongside the NavBar in Bootstrap

Trying to design a sleek navbar that is proportional to the logo size, while also allowing for additional content below it. The jsFiddle link below showcases the current setup. The black line signifies the bottom of the nav bar, which has expanded to matc ...

The Clash of Backdrop Modals and Dropdown Menus

Looking for a solution to ensure that the datetimepicker stays in place when a user scrolls, even after opening the Modal backdrop with the "Open" button? The challenge lies in maintaining the position fixed for the modal while preventing the datetimepic ...

Using a jQuery loop to continuously update a variable

Looking for a solution to my variable dilemma... var closestMarkers = this.FindClosestMarkers( geoLocation.lat(), geoLocation.lng(), this.distance ); Here's the issue: sometimes closestMarkers is '0'. I need a loop that can c ...

What are some strategies for customizing the appearance of child components within a parent component?

I have a scenario where I am using parent and child components. When I use the HTML in another component, I also apply my CSS. For example, in my parent component: HTML <div class="chips"> <p class="tags">Tag 1</p&g ...

Create a personalized attribute for division automation

Is it possible to automatically divide a dynamically populated ListView in jQuery-mobile into two groups based on the attribute values (Downloaded/Not downloaded)? Some listitems have the attribute status="true" while others have status="false". Here is t ...

Exploring an illustration of Bootstrap

As a newcomer to html and css, I am currently working on building a website using the following example template: http://getbootstrap.com/docs/4.1/examples/dashboard/. My issue is that when I zoom in by pressing cmd + '+' or Ctrl + '+', ...

Unable to trigger onclick event for creating a new title

I'm currently working on a text generator project using JavaScript. My goal is to create a function that saves the selected text from a dropdown menu and displays it as the page title when the "Generate" button is clicked. The issue I'm facing i ...

Ways to dynamically update CSS properties (such as changing the color scheme throughout the entire application)

I have a question... If you're interested in conditional styling, the best approach is to utilize either ng-class or ng-style. However... For instance, let's say I'm an admin and I would like to customize the color of my application using ...

How to Create Indentation Without Adding a New Line in Handlebars Mustache Syntax?

Trying to format mustache code for readability, I encountered an issue: {{this.$.Name}} {{this.$.Name}} although the desired output is: namename Is it possible to achieve this format without losing indentation in the .hbs file? ...

Creating a HTML5 canvas animation of an emoticon winking to add a fun touch to your

Currently, I am facing a challenge in animating an emoticon that was initially sketched on canvas. While following a tutorial to implement draw and clear animations using frames, I haven't been able to achieve the desired outcome. With 6 frames of the ...

Adjust the padding at the top of the content according to the height of the fixed header

Currently, I am working on a design layout that includes a fixed header, a main nav, and an additional navigation bar called #sub_nav. The problem arises when the #sub_nav contains numerous items to choose from - as I decrease the width of the browser wind ...

CSS Problem: The first-child, last-child, and only-child pseudo-classes are not functioning as expected when applied to lists

I am facing an issue with the following pseudo classes: first-child: The first a element within each div should have a red background. last-child: The last a element within each div should have a blue background. only-child: Only the a element of the last ...

Is it possible to simultaneously submit a form and access a link?

I am working on a search form that includes checkboxes to filter results, and my objective is to preserve the selected checkboxes when the user navigates between pages (using a Zend paginator for pagination). To achieve this, I am utilizing a $_SESSION va ...