Alternative to layout in HTML
前端 未结 5 1154
忘了有多久
忘了有多久 2021-02-04 07:48

Right now I have a webpage set up to be exactly the size of the browser window with a couple overflow:scroll \'s in it.

Basically, the page is arranged in t

5条回答
  •  时光取名叫无心
    2021-02-04 08:07

    You should generally mark up your content semantically and then style it.

    It looks like you have five main areas:

    • messages
    • user list
    • controls
    • input
    • chatrooms

    Let's make some markup:

    messages
    user-list
    controls
    input
    chatrooms

    And a little bit of style:

    .left{
        clear:both;
    }
        .left div{
            float: left;
        }
    #controls{
        clear: both;
    }
    

    And you should be able to complete it from here. The most important part of most CSS layouts is proper floating.

提交回复
热议问题