Steps for creating a scrollable pane in Internet Explorer

I'm working on creating a new HTML template that features a header that remains fixed at the top of the screen, a footer that stays at the bottom, and the remaining space for text with a scrollbar when needed.

The code below functions correctly in Firefox and Chrome, but for some reason, it doesn't display any text in IE9. Any suggestions on what might be causing this issue?

<!doctype html>
<html>
  <head>
    <title>Image resize test</title>
    <style type="text/css" media="screen">
        html, body {
          margin: 0;
          padding: 0;
          height: 100%;
          width: 100%;
        }

        .wrapper {
          display: table;
          height: 100%;
          width: 100%;
        }

        .wrapper-row {
          display: table-row;
          width: 100%;
          height: 1px;
        }

        .wrapper-content {
          /* Required for Firefox */
          display: table-cell;
          width: 100%;
        }

        .wrapper-row-expanded {
          display: table-row;
          height: 100%;
        }

        .wrapper-row-expanded > .wrapper-content {
          height: 100%;
        }

        .scroll-container {
          display: inline-block;
          overflow-y: auto;
          position: relative;
        }

        .scroll-content {
          position: absolute;
          top: 0;
          bottom: 0;
        }
      </style>

  </head>
  <body>

    <div class="wrapper">

      <div class="wrapper-row">
        <div class="wrapper-content header">
          Header
        </div>
      </div>

      <div class="wrapper-row-expanded">
        <div class="wrapper-content scroll-container">
          <div class="scroll-content">
            <p>
                Insert your text here
            </p>
          </div>
        </div>
      </div>

      <div class="wrapper-row">
        <div class="wrapper-content footer" style="height:200px">
          Footer
        </div>
      </div>

    </div>
  </body>
</html>

Answer №1

Have you considered using an iframe to display the text between the header and footer? This way, you could easily add scrolling functionality if the content exceeds the space available.

<iframe src="URL" scrolling="yes"></iframe>

Answer №2

.scroll-content {
    overflow-y: auto;
    height:200px;
}

Feel free to adjust the height value as needed

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

Navigating the browser view across an extensive HTML page without relying on scrollbars

I have a large HTML page (approximately 7000x5000) and I need to be able to move the user's view around with JavaScript. Disabling the ability for the user to scroll by hiding the browser scrollbars using overflow:hidden on the HTML element is easy. ...

Bug in Responsive Mega Menu Detected

Hey everyone, I've got a Mega Menu below for you to check out! <div id="menu-wrapper"> <ul class="nav"> <li><a href='#'>Brands</a> <div> <div class="nav-colu ...

The Feedback Form jQuery is not providing any data

I'm facing an issue with my html page that includes an ajax query to a php file. The purpose of this php file is to send a message and then return a response to the ajax query. However, no matter what I try, I am unable to receive any response from th ...

Initiate the countdown when the button is pushed

Recently ran into an issue where a button triggers a command to a Perl script, causing the page to continuously load for 60 seconds. To provide users with transparency on when the Perl script will be finished running, I implemented a JavaScript countdown t ...

Set iframe or form to be in a fixed position

Having issues with my site where an iframe is contained within a div. When only one character is entered in the telephone box, validation fails and red warning text is displayed. Furthermore, after clicking in the email box and pressing tab twice, the fo ...

Is there a way to enable scrolling on a page without editing the HTML? I have a table inside a div that is overflowing, and I want the page to scroll,

I'm facing an issue with a DIV that is 600px wide and contains a table. Due to long email addresses, the wrapping isn't working properly even after using word-wrap: break-word. I've experimented with changing the width, adding !important, a ...

The buttons within the bootstrap navbar are not properly collapsing or resizing when the screen size is decreased, causing them to overlap and maintain their

As a newcomer to bootstrap, I recently created a navbar with several buttons. However, when I reduce the screen size to 1000 pixels, the button text gets overwritten and the navbar extends off the screen. I don't want the navbar to collapse at this si ...

Displaying the array after input from the user has been loaded

Is there a way to capture user input from an HTML form and store it in an array using javascript? I want to then display the array as a list in a div tag in the HTML. Although my code is functioning, it seems to be outputting the text twice instead of jus ...

Warning: Close button position is unmanageable

This is what the alert and close button should look like on my website, based on Bootstrap's design. However, after implementing it into my site, it ended up looking like this. I attempted to modify the bootstrap.min.css file, but the changes did not ...

Why is my second CSS animation, which is running late, causing such chaos?

I am currently in the process of animating a simple text. However, I am encountering some issues with making it disappear after a certain period of time: During the initial fade in, the opacity value does not seem to be respected, as the text seems to a ...

Including text in multiple languages on a webpage

Is it possible to switch between different languages when entering text into a text box on an HTML page? For instance, imagine having a text box where users enter their name with buttons to toggle between English and Latin. <html> <body> & ...

Tips for adjusting the size of your logo for the mobile edition of your WordPress site

I have been attempting to adjust the size of our website's logo ( ) for mobile viewing, but so far no code has proved effective. I've tested various iterations like the one below without success: @media (max-width: 360px) { .site-branding ...

Rotate the image using the handler, not by directly manipulating the image itself

I need help rotating the image using a handler instead of directly on the image itself. I do not want to rotate the image when clicking and rotating it directly. Please do not suggest using Jquery UI rotatable because resizing the image with Jquery UI resi ...

Enable the ability to scroll and click to navigate an overlapping Div element

A customer has a website with a dark teal design and is not pleased with the appearance of the scroll bar, as it disrupts the overall style. The client requested that I find a solution without using third-party libraries, and one that they can easily under ...

What is the best way to showcase a full-screen overlay directly inside an iFrame?

As I work in HTML, I'm faced with a challenge - my iFrame is only taking up a small section of the screen (referred to as 'World' in the example below). What I want to achieve is creating a full-screen div overlay from that iFrame, but curr ...

Utilize the design elements stored in the database within Django

I have a style stored in my database and I want to use it in a template, but I'm not sure how to do it. models.py class Post(models.Model): # ... body = models.TextField() # HTML style = models.TextField() # CSS # ... views.py ( ...

Raising css properties using jquery

Is there a way to adjust CSS values using jQuery? I am looking to specifically increase values like top and left, but my current attempt is not producing the desired outcome: var left = 5; $(.object).css("left" + 5); The challenge I am facing is that I ...

What might be causing the overflow of my page width by my navbar?

I am currently working on creating a product landing page for freecodecamp, and I'm facing some issues with my navbar - the first element I need to get right. Could you help me identify what's wrong with my code? Additionally, I would like to ad ...

Ways to enable a file download to a user's computer when a specific HTML button is clicked

<button type="submit" class="myButton" onclick="window.open('test.txt')">Cash Machine</button> This code is not functioning as expected when clicked. The desired action is to prompt the download of test. ...

Turn off any :hover CSS effects that are present when viewing on a separate media

Is it possible to disable hover effects on a specific CSS element during Print Preview and when printing a page? For example, if I have the following code: .this-thing:hover { /* something magical */ } I want to prevent the hover effect defined in .thi ...