Two divs; left should be fixed width, right should fill rest of space

前端 未结 1 1140
借酒劲吻你
借酒劲吻你 2020-12-15 18:49

I\'ve got the following HTML code:

 
Side panel, fixed widt
1条回答
  •  既然无缘
    2020-12-15 19:41

    Here's that link, applied to your code:

    CSS

    #frame   { background:pink }
    #panel   { background:orange; width:200px; float:left }
    #content { background:khaki; margin-left:200px }
    #foot    { background:cornflowerblue }
    

    HTML

    Side panel, fixed width.
    The rest of the content, should be dynamic width and fill up rest of space horizontally.

    Works pretty well! Although, IMHO, you don't need the frame or body (but I don't know the master plan). That would look like this:

    Side panel, fixed width.
    The rest of the content, should be dynamic width and fill up rest of space horizontally.

    0 讨论(0)
提交回复
热议问题