CSS stacking div with variable height on two columns

后端 未结 5 2510
抹茶落季
抹茶落季 2021-02-20 09:05

So I\'m working the profile page of a user on my website. And I\'m having a little problem with the CSS.

My problem is the following: I have four div boxes with a fixed

5条回答
  •  情深已故
    2021-02-20 09:27

    I recommend that you divide the content into two columns:

    HTML:

    Content goes here for basic info
    Content goes here for latest videos
    Content goes here for contact info
    Content goes here for latest photos

    and in your CSS add:

    .column{float:left; width:50%;}
    

    UPDATE: the boxes inside the columns don't need to be floated if you use this solution

提交回复
热议问题