简体   繁体   中英

position div using css

Could you please refer this http://jsfiddle.net/BRWWN/ How can I position the divs in the following order.

The blue div shows in left as a left side menu, the red div comes right of the blue div.

Add float:left; to both:

#a {
 width: 25%;
 border: thick solid Blue;
 height: 200px;
 display:inline;
 float:left;
}

#b {
 width: 25%;
 border: thick solid Red;
 height: 200px;
 display:inline;
 float:left;
}

或将display: inline更改为display: inline-block对于两个div。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM