Home > Web Front-end > HTML Tutorial > The same code displays differently in DMcs6 and VS2010. Why is this? _html/css_WEB-ITnose

The same code displays differently in DMcs6 and VS2010. Why is this? _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:53:47
Original
1228 people have browsed it

The code is as follows:

<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><style>#lside{	width:20px;	height:100px;	background:green;	float:left;}#rside{	width:20px;	height:100px;	background:red;}</style></head><body><div id="lside">我是左</div><div id="rside">我是右</div></body>
Copy after login

It is displayed as follows in DM. The second div is drilled under the first one:

It is displayed as follows in vs2010. The second div is exactly the same as the first one. Side by side:

What's going on?


Reply to the discussion (solution)

Just display it normally on the browser

Compatibility, please pay attention! ! !

Do not rely on the effect previewed on VS or DM, but on the effect seen on the browser.

#rside
{
width:20px;
height:100px;
background:red;
float:left;
}
Just add it Correct

This is caused by the difference in the interpretation of floating between IE series and non-IE series

Points will be awarded for posting. Thanks for the help.

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