How to place two divs next to each other?

后端 未结 13 2054
孤独总比滥情好
孤独总比滥情好 2020-11-22 05:44

Consider the following code:

13条回答
  •  执念已碎
    2020-11-22 06:11

    #wrapper {
    width: 1200;
    border: 1px solid black;
    position: relative;
    float: left;
    }
    #first {
    width: 300px;
    border: 1px solid red;
    position: relative;
    float: left;
    }
    #second {
    border: 1px solid green;
    position: relative;
    float: left;
    width: 500px;
    }
    Stack Overflow is for professional and enthusiast programmers, people who write code because they love it.
    When you post a new question, other users will almost immediately see it and try to provide good answers. This often happens in a matter of minutes, so be sure to check back frequently when your question is still new for the best response.

提交回复
热议问题