How to split page into 4 equal parts?

后端 未结 6 1174
走了就别回头了
走了就别回头了 2020-12-14 06:37

I want to divide my page into four equal parts, each of same height and width (50-50%).

I don\'t want to use JavaScript. I want blocks (

6条回答
  •  眼角桃花
    2020-12-14 07:11

    try this... obviously you need to set each div to 25%. You then will need to add your content as needed :) Hope that helps.

     
       
       CSS devide window by 25% horizontally
       
       
       
       
         
    Top- height is 25% of window height
    Middle 1 - height is 25% of window height
    Middle 2 - height is 25% of window height
    Bottom - height is 25% of window height

    Tested and works fine, copy the code above into a HTML file, and open with your browser.

提交回复
热议问题