How can I activate the parent page scroll for pop-up windows?

When clicking on a link, a popup box will appear and I am looking to enable scroll for the parent page. However, the popup is not displaying properly on small screen laptops and I am unable to adjust its height. I need to find a way to enable scrolling in this situation.

.popup{
display: block;
z-index: 1002;
outline: 0px;
position: fixed;
height: auto;
width: 730px;
top: 209px;
left: 259px;
}

Answer №1

When it comes to pop-up boxes, they are typically styled with position: absolute;, meaning they are outside the normal document flow. Instead of using fixed, opt for absolute. Even popular platforms like Stack Overflow use absolute positioning for their flag box, ensuring it remains stationary on the page even when scrolling. If your element exceeds the defined width and you want a scroll bar to appear, make sure to avoid using overflow: hidden;. Consider using clear: both for clearing floats instead. This should help display the desired scroll bar.

Answer №2

To achieve this effect, simply include the CSS overflow attribute:

overflow-y: auto;
overflow-x: hidden;

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

Display the onclick event of multiple buttons on a web page

I am currently working on extracting the "onclick" attribute (onclick="openDirection( 41.051777,28.986551)") from the first button element within each li element. My goal is to display all of the coordinates. In the provided code snippet, I have been abl ...

Relocating to reveal or conceal item

I am currently working with jQuery and trying to achieve a specific functionality. My goal is to hide and unhide an element, while also focusing on the exposed area once it becomes visible. I have a link #welcomeselect that, when clicked, should reveal t ...

Implementing features similar to Facebook comments using ASP.NET

I'm currently working on a project to create a blog platform using ASP.NET. One of the key features I'd like to include is the ability for users to add comments. My goal is to replicate the functionality of Facebook when it comes to adding and d ...

Having trouble populating observableArray with data retrieved from the server

I am facing an issue where I cannot insert values into my observableArray when retrieving data from the server, even though other elements are able to receive data. Here is the JavaScript code snippet: var itemViewModel = { item: {}, isLoaded: ko ...

Combining an attribute selector with a variable results in a syntax error

Although this code is functioning properly and the class is successfully added, an error message is being displayed. console.log(key); //first_date $('*[name='+key+']').addClass('error'); ERROR: Uncaught Error: Syntax er ...

Safari (mac) experiencing issues with loading material icons properly on initial attempt

Upon my initial visit to the website, I noticed that the font appeared distorted. https://i.sstatic.net/BtUxI.png However, when I right-clicked and chose "reload page", the fonts were displayed correctly. https://i.sstatic.net/3XUcA.png This issue seem ...

`Flex alignment of columns in Bootstrap 4`

I'm feeling really lost here. I had everything figured out, but after refreshing the jsfiddle, the solution suddenly changed on me. I have a row with two columns in it, but for some reason, I can't get them to align properly on the same row. I at ...

What benefits do Definitely Typed TypeScript files offer for Knockout and jQuery?

I'm not sure if this is a silly question, but I was wondering if it's necessary to use definitely typed (.d.ts) versions of external libraries when working with Typescript. Currently, my code base uses jQuery and Knockout in the traditional manne ...

Styling table cell borders using CSS

I am encountering some issues with the table below. Firstly, there seems to be errors in the HTML code that are being flagged. However, the main problem I am facing is that the left column is not receiving a complete border and I cannot determine the cause ...

How can I utilize Material-UI's Grid component to make a single cell occupy the entire remaining horizontal space?

I am currently utilizing the Grid component from material-ui in my React 16.13.0 application. My objective is to create a row with three items. The first two items are supposed to occupy only the required space without specifying pixel values. I want the t ...

Learn the simple technique for transferring text to the clipboard using the data-title attribute

Hey there, I need some help with the following code snippet: <h3 class="project discord" data-title="test1234"><i class='bx bx-fw bx-tada-hover bxl-discord-alt'></i>Discord</h3> I want to be able to c ...

Capture latitude and longitude using HTML5 Geolocation and store the values in a PHP variable

In the midst of a project, I am tasked with obtaining the longitude and latitude of a user in order to pinpoint their location. The challenge lies in storing this data in PHP variables, which will ultimately be saved in a MySQL database. Can anyone offer ...

Is there a way to automatically change the full screen background on refresh?

Is there a way to have the background image of this website change to different pictures every time the page is refreshed? I'm curious about how this can be achieved. I noticed that Offliberty is able to do this. I tried looking at the source code b ...

designing a button with eye-catching CSS3 styles

Although I struggle with CSS, I managed to create a button that looks pretty good. However, it doesn't have the same shine as the buttons on Yahoo Mail or the buttons found at Check out my demo on Fiddle: http://jsfiddle.net/karimkhan/y6XGg/ I wou ...

Enhancing User Experience with JQuery Loading Dialog Animation

Previously, I utilized the YUI container for loading effects. You can check it out here: http://developer.yahoo.com/yui/examples/container/panel-loading_clean.html However, someone recommended using jQuery instead. Does anyone have a link or code to crea ...

Strange behavior observed in Bootstrap navbar-brand class logo

As I work on creating a responsive HTML page using Bootstrap CSS, my focus is on the navbar-brand class that contains a logo element. Here's the code snippet in question: <div class="grad"> <a class="navbar-brand" id="navbar-logo" hre ...

Storing the AJAX response in an external variable using jQuery callback function

I'm struggling to set a variable with the results of an ajax query. I understand that I can't just return the result in the success function due to its asynchronous nature. However, I'd like to achieve this using a callback function without ...

Get rid of the border surrounding a main call-to-action button

While trying to override Bootstrap styles, I encountered a problem. Whenever the user presses a primary button <button class="btn btn-primary">Test</button> An annoying blue outline appears and I can't seem to remove it. I attempted to o ...

Unable to view Mp4 video on Internet Explorer 11

My background video is in mp4 format and functions properly in Chrome, Firefox, and other browsers, but it does not work in Internet Explorer 11. To visit the website, click on "access as a non-secure site". ...

Creating Unique Numbers for Every <a> Element

Can someone help me figure out how to create a form that generates a unique set of random numbers from the range (0,9) displayed in a group of button tags? I've written some javascript code but it's not quite working as intended. (function($) ...