How to properly float two columns side by side with css

前端 未结 4 1171
[愿得一人]
[愿得一人] 2020-12-29 09:20

This is one of those things I learned a long time ago and never thought much about if I was actually doing it the right way.

Let\'s say we have a structure

4条回答
  •  孤独总比滥情好
    2020-12-29 10:20

    using float left or right is not important. you have wrapper with the width of 600px. when you using float for both sidebar and contain inside the wrapper, you must make sure that the width of sidebar and contain (including margin and padding) equal or less than 600px. If not, the second element will be below the first one. Hope this helps ^^

提交回复
热议问题