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

Home Forums CSS Nested div question

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

    I’ve been racking my brain about this one, but I cannot seem to figure it out.

    Lets say I have a parent div with dimensions 300w x 200h. This parent div has two children with the same dimensions. I wish to have the two children divs next to each other with overflow-y of the parent set to scroll. I have tried floats and inline-block.

    I can achieve it using absolute positioning. If this is the only way possible, I will bite the bullet and do it this way.
    [Link to Dr. Let]( “”)


    The only way I have ever known how to do it (_mainly because I don’t like horizontal content that scrolls_) is by have the parent container use a set width with an inner container that is the width of the elements within it in which case is `600px` in your example.

    See the following pen for an example:

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