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

5 Commands to Use the Calculator in Linux Command Line

Hello everyone, I am Liang Xu. When using Linux, ...

Summary of MySQL stored procedure permission issues

MySQL stored procedures, yes, look like very rare...

Native JS to achieve book flipping effects

This article shares with you a book flipping effe...

Detailed explanation of how to use Vue self-nested tree components

This article shares with you how to use the Vue s...

Vue uses ECharts to implement line charts and pie charts

When developing a backend management project, it ...

Attributes in vue v-for loop object

Table of contents 1. Values ​​within loop objects...

A brief discussion on whether CSS animation will be blocked by JS

The animation part of CSS will be blocked by JS, ...

Detailed explanation of publicPath usage in Webpack

Table of contents output output.path output.publi...

How to optimize a website to increase access speed update

Recently, the company has begun to evaluate all s...

CSS XTHML writing standards and common problems summary (page optimization)

Project Documentation Directory Div+CSS Naming Sta...

Vue implements zoom in, zoom out and drag function

This article example shares the specific code of ...

Implementation of CSS border length control function

In the past, when I needed the border length to b...

MySQL foreign key (FOREIGN KEY) usage case detailed explanation

Introduction: The disadvantages of storing all da...

Detailed example of MySQL (5.6 and below) parsing JSON

MySQL (5.6 and below) parses json #json parsing f...