How to position three divs in html horizontally?

前端 未结 4 2247
夕颜
夕颜 2020-12-13 12:20

I am creating a sample website which has three divisions horizontally. I want the left most div to be 25% width, the middle one to be 50% width, and right to be 25% width so

4条回答
  •  粉色の甜心
    2020-12-13 12:44

    You can use floating elements like so:

    Left Side Menu
    Random Content
    Right Side Menu

    Note the overflow: hidden; on the parent container, this is to make the parent grow to have the same dimensions as the child elements (otherwise it will have a height of 0).

提交回复
热议问题