Home > Web Front-end > HTML Tutorial > Solution to the problem of invalid width setting for label and span_HTML/Xhtml_Web page production

Solution to the problem of invalid width setting for label and span_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:39:23
Original
1903 people have browsed it

By default, the width settings of label and span are invalid. Generally, the display attribute

Copy the 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 the code
The code is as follows:

display:inline-block;

This way there will be no line breaks. .

To add how to draw '口口', you should use

Copy the code
The code is as follows:

display:inline;
float:left;

But be sure to add

in the following div Copy the code
The code is as follows:

clear:both;

Otherwise it will affect the div layout behind it It will be messy.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template