CSS Float floating mode

Source: Internet
Author: User

Floating is often used to promote one image side or the other side, while there is a text summary section around. This type of application is often called text wrap and similar to the various image shapes and sizes you will see in many magazines that have articles summarizing various places.

Float image
CSS float attributes that are easy to use when packaging text images. You have a choice, either on the left or right of the floating image, and the rest is done for you. The following is an example. An image is the most commonly used section in different aspects.

Img. floatLeft {
Float: left;
Margin: 4px;
Img. floatRight {
Float: right;
Margin: 4px;

Html instance code.


<P> The images are contained with... </p>

<P> This second paragraph has an... </p>

Float multiple images
If you only have three images floating right, they will appear in each other. If you want the image to start earlier than the end of the year in the future, then use CSS to clear the attributes.

Img. floatRightClear {
Float: right;
Clear: right;
Margin: 4px;


<P> The images are appearing... </p>
<P> If we had specified... </p>
<P> The number of paragraphs... </p>


Related Article

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.