Printing issues with IE11 limited to first page of scrolling pop-up window

When attempting to display a lengthy list of elements on the screen, I noticed that in Internet Explorer only the first page prints and the rest of the elements are cut off. However, in other browsers, the list prints correctly. It's important to mention that this is not within an iframe, but rather within a pop-up that is positioned absolutely on the page. The extensive list of elements is contained within a scrolling <div> element within the pop-up due to its length.

I have tried several approaches to address this issue without success:

  1. Removing absolute positioning from all elements on the page
  2. Eliminating floats from the page layout
  3. Setting all overflow properties to visible or commenting them out
  4. Getting rid of all height properties from the elements

Unfortunately, since the root cause of the problem is unknown, I am unable to provide a code sample that replicates the issue for debugging purposes. This problem exists within a larger Angular 2 application.

Answer №1

It turns out that the issue was related to absolute positioning, but in conjunction with calculated page heights.

The main component of the application had a height defined using CSS calculations, such as calc(100vh - 200px). By changing this height to height: auto within a @print media query for the component, I was able to remove position: absolute from the pop-up and have it function properly.

It's worth noting that similar problems could arise if the main component had any fixed height, not just a calculated one.

To sum up: If you encounter this problem, be sure to check for fixed height parent elements combined with absolute positioning.

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

Issues with color scheme in Angular Material 18

While using (ng generate @angular/material:my--own-theme), I came across some code in own-theme.scss. Surprisingly, this code works for the palette included in Angular Material, but I prefer to use my own theme. Here's what was generated and what I di ...

Different CSS Transform values are required based on the length of the text

I have created a demo that showcases 5 floating <div>s with rotated text of various lengths. Is there a way to implement a CSS class that can centrally align all text, regardless of length? Currently, I find myself creating a new class for each chara ...

Is there a way to create a flexbox that combines a centered fixed child with a fixed child at the bottom?

I'm trying to create a layout using flexbox that looks like this: | | | | | CENTER FIXED ELEMENT | | | | BOTTOM FIXED ELEMENT | Here is the flexbox CSS I've attempted: .wrapper{ ...

Is there a method to access a website, trigger JavaScript functions, and subsequently retrieve the HTML content using PHP?

I am currently exploring options to access a webpage, execute JavaScript functions on it (thus altering the HTML content), and eventually save the modified version of the page. I'm uncertain if this approach is feasible, and if not, are there alternat ...

Adjust the Height of a Div Following an Ajax Request

ISSUE: Currently, I have a dynamic form that utilizes JQuery steps to transform it into a wizard. At one of the steps, selecting an option from a drop-down menu triggers an AJAX call which adds additional form fields dynamically. The challenge lies in adj ...

What is the best way to decrease the spacing between buttons?

I've been working on creating a welcome banner for my index page, but I'm facing an issue where the buttons need to be closer to each other. However, I can't seem to figure out how to achieve this. The buttons should be aligned to the right ...

"HTML and JavaScript: The search functionality fails when trying to search for a string that is sourced from an array

Could someone assist me with a comparison issue I'm encountering? I am trying to use the includes() method to compare a list in a table with a list of names stored in a string. Strangely, when I hardcode the string directly into the includes() method, ...

Is it possible to use Material-UI without React, and instead with just vanilla HTML, CSS, and JS?

After spending some time learning Vanilla JS and working on basic projects, I am eager to dive into React. However, before making the switch, I want to spend a little more time practicing Vanilla JS. In my search for a CSS framework that would make protot ...

CSS that creates a repeated background image sourced from an 'image map'

I have created an image map with coordinates and dimensions specified (apologies for the rough drawing...) https://i.sstatic.net/CxQAk.png The numbers represent x-coordinate, y-coordinate, width, and height. For instance, 5, 5, 25, 25 indicates that the ...

The image area mapping is displaying infinity instead of a specific numerical value

Currently, I am utilizing the library react-image-mapper to incorporate clickable areas on an image. However, upon the initial page load, the generated HTML displays the area with a value of infinity, rendering the image unclickable. It is only after a pag ...

Conceal the sidebar menu by clicking anywhere outside of the menu bar or the designated button

I attempted to create a menu similar to the semantic UI, but so far I have only been able to click the menu button to open and close the menu. I am using a toggle class to display the sidebar, but I'm unsure if this approach is entirely correct: < ...

Select a Date: Input for Date Selection

Is it possible to restrict the selection of certain days using HTML date input validation? Some booking websites have a feature where an interactive calendar only allows users to select specific dates for events, while others are greyed out and cannot be c ...

Video on Youtube keeps playing even after the overlay is closed

I successfully created an overlay with an embedded YouTube video that automatically opens when the page loads. Everything was going smoothly until I encountered a problem - when I close the overlay while the video is playing, the audio continues to play in ...

Make the inner div within the td stretch to cover the entire height of the td

Inside the first tds, there is dynamic text content that automatically expands the trs and tds. However, the second tds have a div with a background image but no text inside. I want these divs with background images to expand or collapse along with the tab ...

Issue with AngularJS: Local storage not saving updated contenteditable data

My local storage implementation stops working when I attempt to incorporate contentEditable feature. Here is the link to the CodePen for reference: https://codepen.io/zanderbush/pen/WNwWbWe. Any assistance would be greatly appreciated. The functionality w ...

Is there a way to automatically redirect the main html page to a different html page upon logging in?

I have created a main page in HTML with a login box that displays a message saying "Login successful" or "Login failed" based on whether the password entered is 8 characters or more. The validation function for this works correctly, but after successfully ...

Having difficulty generating a suitable CSS selector

Within a webpage, there are two types of links. One type includes both a class and itemprop, while the other type only contains a class. In the examples below, the first link has both class and itemprop, and the second link only has a class. If I want to c ...

Hovering over graphics for automatic scrolling

I have successfully implemented a hover effect that scrolls down an image inside a div. However, I am facing an issue with making the scroll longer for images of varying lengths by using calc inside the transition property. Below is the code snippet that ...

Avoid unnecessary extra margin on CSS div elements

Currently working with Bootstrap4. In a row with 2 col-md-6 (totaling 12 columns for the row). However, experiencing an unwanted margin on the left column as shown in the image below. How can I remove it? https://i.sstatic.net/u5oix.png html: <hea ...

Step-by-step guide on positioning a div below another div and centering both elements horizontally

Trying to center the "input" div below the "InputBelow" div using "flex-direction: column" is causing issues with "justify-content; center." The goal is to center the main "border" div in the middle of the screen and align the other elements inside it. ...