Solution to the problem of invalid width setting for label and span

Solution to the problem of invalid width setting for label and span
By default, setting width for label and span is invalid. Generally, the display attribute is required

Copy code
The code is as follows:

display:block;

That's it. But it will automatically add a line break. If you don't want a line break, you can use

Copy code
The code is as follows:

display:inline-block;

This way there will be no line break. .

Add how to draw the "口口"

Copy code
The code is as follows:

display:inline;
float:left;

But you must add it in the div behind

Copy code
The code is as follows:

clear:both;

Otherwise it will affect the div layout behind and make it messy.

<<:  CSS positioning layout (position, positioning layout skills)

>>:  18 Web Usability Principles You Need to Know

Recommend

Learn about TypeScript data types in one article

Table of contents Basic Types any type Arrays Tup...

Vue.js framework implements shopping cart function

This article shares the specific code of Vue.js f...

Website redesign is a difficult task for every family

<br />Every family has its own problems, and...

Specific use of MySQL internal temporary tables

Table of contents UNION Table initialization Exec...

JS array deduplication details

Table of contents 1 Test Cases 2 JS array dedupli...

How to hide elements on the Web and their advantages and disadvantages

Example source code: https://codepen.io/shadeed/p...

Detailed explanation of the use of Vue.js render function

Vue recommends using templates to create your HTM...

What to do if the container started by docker run hangs and loses data

Scenario Description In a certain system, the fun...

JS ES new feature of variable decoupling assignment

Table of contents 1. Decoupled assignment of arra...

Linux configuration SSH password-free login "ssh-keygen" basic usage

Table of contents 1 What is SSH 2 Configure SSH p...

Why should the number of rows in a single MySQL table not exceed 5 million?

Today, let’s discuss an interesting topic: How mu...

Detailed examples of Docker-compose networks

Today I experimented with the network settings un...