Style and HTML code that lets multiple div appear on the same line

Source: Internet
Author: User

The implementation of multiple div in the same row of the application is still more extensive, so do an example, beginners can refer to, hope to help you

The following are CSS styles:

Copy Code code as follows:
div{
margin-bottom:10px;
Clear:both;
Word-break:break-all;
Word-wrap:break-word;
}

Copy Code code as follows:


<pre name= "code" class= "CSS" ><!--width Specifies the width of each div occupied--></pre& gt;. Custom_div{height:23px;width:50px;line-height:23px;float:left;}
<pre></pre>

The following is the HTML code:
[Code]
<pre name= "code" class= "HTML" >
<div id= "pid" >
<div id= "D1" class= "Custom_div" >jelly1</div>
<div id= "D2" class= "Custom_div" >jelly2</div>
<div id= "D3" class= "Custom_div" >jelly3</div>
</div></pre>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.