How to make a page with header and left-sidebar?

后端 未结 6 887
醉话见心
醉话见心 2020-12-29 06:41

I\'d like to make a webpage like this:

|----------------------------|
|            header          |
|----------------------------|
|  L  |                           


        
6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-29 07:28

    You can also use display : table and display : table-cell to create a page that holds a table-level element with 2 table-cells (sidebar & content area)

    #outer-container { display: table; width: 100%; height: 100%; } #sidebar { display: table-cell; width: 15%; vertical-align: top; } #content { display: table-cell; width: 85%; vertical-align: top; }

    A tutorial with a demo here : http://usefulangle.com/post/61/html-page-with-left-sidebar-main-content-with-css

提交回复
热议问题