CSS Div does not break line

Source: Internet
Author: User

1. Use Tbale package div for column

2, the use of style float:left;

3, the use of style display:inline;

<HTML><Head>    <styletype= "Text/css">. Myrow{Border:#c3c3c3 1px solid;Height:30px;margin:5px;        }. Myfloat{float: Left;margin:2px;        }. Mydisplay{Display:inline;margin:2px;        }. Myline{Border-style:Solid;Border-color:#c3c3c3;Border-width:0px 0px 0px 1px;Height:20px;        }    </style></Head><Body>    <DivID= "Row1"class= "Myrow">      <Table>      <tbody>      <TR>        <TD>            <Div>root cause 1</Div>        </TD>        <TD>            <Div>            </Div>        </TD>        <TD>            <Div>Failure Scenario 1</Div>        </TD>        <TD>            <Div>            </Div>        </TD>      </TR>      </tbody>      </Table>    </Div>        <DivID= "Row2"class= "Myrow"style= "height:30px">        <Divclass= "Myfloat">root Cause 2</Div>        <Divclass= "Myfloat myline" >        </Div>        <Divclass= "Myfloat">Failure Scenario 2</Div>        <Divclass= "Myfloat">        </Div>    </Div>        <DivID= "ROW3"class= "Myrow">        <Divclass= "Mydisplay">root Cause 3</Div>        <Divclass= "Mydisplay">        </Div>        <Divclass= "Mydisplay">Failure Scenario 3</Div>        <Divclass= "Mydisplay">        </Div>    </Div>    </Body></HTML>

CSS Div does not break line

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.