Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Div scrolling, with parent

I have a div. And this div contains a very long list. This list becomes scrollable automatically.

This div is then inside another div, which fills out the entire screen.

Scrolling works fine, but it only works when the mouse is over the inner div, the one that actually contains all the data.

But I want scrolling to work, also when the mouse is over the parent div, the one that fills out the entire screen.

How do I do that?

You can see the sample here: https://openage.org/fs/jsl_forritun/?page=hlutir

It doesn't scroll when the mouse is over the darker part. /:

like image 737
john-jones Avatar asked Jan 31 '19 13:01

john-jones


People also ask

How do you make a div scroll overflow?

Set the overflow-x:hidden; and overflow-y:auto; that will automatically hide the horizontal scroll bar and present only vertical scrollbar. Here the scroll div will be vertically scrollable. Example 1: html.

Can a child div be bigger than parent?

The child DIV needs to be the same width as the browser viewport. The child DIV must stay as a child of the parent div.

How do I stop div scrolling?

To hide the scrollbar and disable scrolling, we can use the CSS overflow property. This property determines what to do with content that extends beyond the boundaries of its container. To prevent scrolling with this property, just apply the rule overflow: hidden to the body (for the entire page) or a container element.


1 Answers

you have two divs that contains your content body

  1. id= "nhreyfing"

give him this style padding: 0 20vw; background: black or what so ever padding you wanna give him

  1. id= "content"

give him your rgb(213, 191, 134) background

like image 153
elad BA Avatar answered Oct 07 '22 19:10

elad BA