1. Use the <nobr> tag to achieve no line break Copy code The code is as follows:<div>Hello world! <nobr> Hello world!<nobr></div> 2. Use the <nowrap element> tag Copy code The code is as follows:<div nowrap>Hello world! Hello world! Hello world! Hello world!</div> 3 Force no line break Copy code The code is as follows:div{ white-space:nowrap; } 4. If there are two divs, float can be used to avoid line breaks Copy code The code is as follows:<div class="class1">hello</div> <div class="class2">world! </div> .class1 {float:left;} 5. Display can also be used in div to achieve no line break Copy code The code is as follows:<div class="class1">hello</div> <div class="class2">world! </div> .class1 {display:inline;} .class2{display:inline;} |
<<: Linux service monitoring and operation and maintenance
>>: MySQL Series 12 Backup and Recovery
Table of contents Node connects to Mysql Install ...
Use the mysql command to connect to the MySQL ser...
Front-end test page code: <template> <di...
1. Record several methods of centering the box: 1...
Operation effect: html <div class="tic-ta...
MySql Null field judgment and IFNULL failure proc...
1. Introduction A few days ago, I encountered a p...
I have nothing to do recently, so I tinker with C...
Table of contents 1. Introduction 2. Direct recov...
Run and compile your programs more efficiently wi...
This article example shares the specific code of ...
<br />Previous Web Design Tutorial: Web Desi...
This article aims to use the clearest structure t...
1. Four startup methods: 1.mysqld Start mysql ser...
1. To develop web responsively, the page must ada...