Auto height of div

前端 未结 5 1123
被撕碎了的回忆
被撕碎了的回忆 2020-12-13 10:27

Browser shows div only when I set exact height. But i want to create resizable div according it\'s contents. Tried height: auto and height:100%. It doesn\'t help.

My

5条回答
  •  忘掉有多难
    2020-12-13 10:51

    As stated earlier by Jamie Dixon, a floated

    is taken out of normal flow. All content that is still within normal flow will ignore it completely and not make space for it.

    Try putting a different colored border border:solid 1px orange; around each of your

    elements to see what they're doing. You might start by removing the floats and putting some dummy text inside the div. Then style them one at a time to get the desired layout.

提交回复
热议问题