Home > Web Front-end > HTML Tutorial > Strange problem with style_html/css_WEB-ITnose

Strange problem with style_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:00:44
Original
932 people have browsed it

Asking a question about style, the HTML code is as follows

<div>	<div style='background-color:#e0e;width:100px;height:100px;display:inline-block;'> </div>	<div style='background-color:#e0e;width:100px;height:100px;display:inline-block;'></div></div>
Copy after login

The effect is as follows:

What I want is that no matter what is placed in the DIV, the two are juxtaposed. I don’t know. Why did the DIV get removed after adding a  ?


Reply to discussion (solution)

You can use float:left to achieve this effect


 



 




Text alignment

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