Two divs: one fixed, other stretched

后端 未结 3 1024
别那么骄傲
别那么骄傲 2021-02-19 11:51

I am trying to accomplish this: \"divs-fixed-and-stretched\"

But I am having trouble getting the two middle divs to

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-19 12:16

    Here, I made a duplicate of your picture: jsbin.com/ipexep/3 (click "edit in jsbin" at the top-right to view and edit the source)

    I for the height of the top and bottom sections, I took the height for them that you put in the picture.

    Note: I did it by making every section absolutely positioned and setting their top, bottom, left, or right attributes accordingly.

    Also, notice that my method will match every screen size. I have streched it in every area you didn't specify a dimension. (except the header and footer needed a height dimension so I guessed since you didn't specify)

提交回复
热议问题