Div left on left to show CSS left left

Source: Internet
Author: User

Div left on left to show CSS left to left (body sense music)

Div left on the right to display the chapter

Div on the right to the left needs CSS style word for CSS floating float, set float:left can realize div box left display.

Small example:
To see if the div is displayed on the left, we set its CSS width to 300px, the height to 120px, the border to a 1px black border, and the div named ". Div-left"

1. CSS Code:

. div-left{width:300px;height:120px;border:1px solid #000; Float:left} (Body music)

2. HTML Application code snippet:

<div class= "Div-left" > This box is left </div>

3. Complete Css+div Code:

<! DOCTYPE html>
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/> (body Sense music)
<title>divcss5 Left Example </title>
<style>
. div-left{width:300px;height:120px;border:1px solid #000; Float:left}
/* CSS Comment Description: Float:left set left to left */
</style>
<body>
<div class= "Div-left" > This box is left </div>
</body>

You can do the above code copy using the observation results, whether to achieve the DIV tag box left-hand display. (Body feeling music)

4, Case:

Div left-to-left instance
Div CSS implements left left-hand instance of box

We set the left to the right, and left to the right are using the CSS floating style word float, its style value is left is the right.

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.