The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS how do i scroll div content uniquely without js

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #285478

    2 divs
    Width is 50%
    Split screen layout
    First div has a logo that just exceeds the viewport space
    This causes the body to scroll while the content in the second div does not overflow
    Adding overflow/hidden to body will stop the scroll but create problems when the content in the second div has overflown
    Wouldn’t think a background image in place of img tag in the first div is the solution because you cant control max width and max height of background images
    Unless you control the max height and max width of the actual block element the background image is within
    The objective is to scroll the second div when content overflows but not scroll the first div kind of locking the design in place
    Fixed positioning on the first div may not be best practice because both divs belong to a parent container that uses display/flex
    Any ideas without messy javascript?


    Just to clarify..
    Content in the second div not overflow unless the window has been resized and causes the content to overflow..
    I am using @media queries for responsive behavior but
    I guess I would have to create another @media query based on height only to allow for content overflow/scroll enable on the body
    Unless someone has a better idea


    I guess I could use fixed pos for both divs. Just not sure how well that would behave with flex.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.