Home > Web Front-end > HTML Tutorial > I have a problem to solve_html/css_WEB-ITnose

I have a problem to solve_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-24 12:17:44
Original
1008 people have browsed it

					<div style="width:100%;height:29px;font-family:宋体;font-size:14px">						123456					</div>					<div style="width:100%;height:1px;background-color:#000">					</div>					<div style="width:100%;height:29px;font-family:宋体;font-size:14px">						123456					</div>
Copy after login

Why does the middle div with a height of 1 pixel become 18 pixels in IE8? Anyone who knows, please tell me
Or it can solve the difference between the borders of IE and Chrome browsers
ie border = length * width
Others = length * width border


Reply to discussion (solution)

Use css hack, different browsers do not support individual attributes Same, then set it for individual attributes

Because IE has a default height, just set overflow:hidden. .

<div style="width:100%;height:29px;font-family:宋体;font-size:14px">    123456</div><div style="width:100%;height:1px;background-color:#000;overflow:hidden"></div><div style="width:100%;height:29px;font-family:宋体;font-size:14px">    123456</div>
Copy after login

. . I'm a step behind the moderator, I just tried it myself
I did add this
overflow:hidden;

I'm 2, so I tried it myself without reading the reply. . .

Because IE has a default height, just set overflow:hidden. .

XML/HTML code?12345678

123456
Related labels:
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