简体   繁体   中英

Two DIVs side-by-side

There are two DIVs in my HTML code and they are not nested. I want to display the images in these DIVs side-by-side. First DIV on the left and the second on the right.

<div style="float:left">First Image Here</div>
<div style="float:left">Second Image Here</div>
<div style="clear:both"></div>

CSS:

div.yourDivClassName { display:inline; }

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