Forums

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

Home Forums Design An outer div is not containing an inner div.

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #264892
    icewizard
    Participant

    I have an outer div called center box encompassing a bunch of inner divs including the class .quote box and .buttons, but the outer div only covers up the .quote box div. I am using float right on .buttons, and I tried clear floating it but nothing works. I will appreciate any help to fix this. Here is a link to my code pen with the problem :https://codepen.io/icewizard/pen/xpdpWK

    #264907
    Paulie_D
    Member

    It’s not clear what it is this is supposed to look like.

    Perhaps you could clarify?

    #264940
    icewizard
    Participant

    I mean I want the outer div to expand with the inner divs content. If I remove the minimum height from my outer div containing everything, then the new quote button, which is floating to the right, will not be covered by the outer div, but I want it to be covered by the outer div so the outer div contains all the divs inside of it. I tried putting the height to auto and using clear floats but nothing has worked, so I’m not sure what to do.

    #264947
    Paulie_D
    Member

    Hmm…did you update the Codepen, I’m pretty sure it didn’t look like that before but OK.

    Regardless, just adding overflow: hidden; to .center-box (which clears the floats) seems to solve the issue.

    https://codepen.io/Paulie-D/pen/baoPqm

    #264948
    icewizard
    Participant

    Yes I did. And thank you this solves my problem.

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