Home > Web Front-end > HTML Tutorial > Can a css expert help me? Why is there always a gap between the browser and the div in this code? _html/css_WEB-ITnose

Can a css expert help me? Why is there always a gap between the browser and the div in this code? _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:13:01
Original
1129 people have browsed it

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>东有限公司</title><style type="text/css">/* CSS Document */html{padding:0;margin:0;}body{margin:0;padding:0;text-align:center; font-family:"宋体"; font-size:12px; color:#001080; line-height:22px;background-color:#EAEAEA;}#header{ width:963px; height:68px;margin:0 auto;background-color:#FFFFFF;padding-left:19px;padding-right:20px;}</style></head>  <body><div id="header"> </div></body></html>
Copy after login


I also tested it on others. Why do I have to write it by hand to solve it? I don’t want to write it by hand, because this is the remaining few pieces of code after I deleted the entire page~···


Reply to the discussion (solution)

# header{Add a margin-top:-22px and try}

line-height:22px; Remove this. What are you doing with it?





East Co., Ltd.



< div id="header">



. . How to respond one to one?

None of them. . . You can call it yourself on the third floor. . I've said it before, why do you have to fight it yourself? .

None of them. . . You can call it yourself on the third floor. . I've said it before, why do you have to fight it yourself? .

I didn’t type it by hand, I pasted it directly to yours. If there is a space after your , just remove it.

■■


< There are two Chinese space symbols behind the /head> tag!

There are three special characters after this line, which can be seen by opening it with notepad.

There are three special characters after this line, which can be seen by opening it with notepad.

1

Quote from the 9th floor’s reply:

There are three special characters after this line, which can be seen by opening it with notepad.

1

Yeah. . Solved, what the hell is coming, can’t be seen. Adding spaces back doesn't work. However, the problem on my original page has not been solved yet ~ · faint

I don’t know what you mean by there is a gap between the browser and the head.
You have # in front of head in the css, and head width = 963px will affect the format. I don’t know what the effect you want is.

Quote from the 10th floor’s reply:


Quote from the 9th floor’s reply:

There are three special characters after this line, you can see it when you open it with notepad.


1

Yeah. . Solved, what the hell is coming, can’t be seen. Adding spaces back doesn't work. However, the problem on my original page has not been solved~· faint
The one that existed before was full code, and the one you added later is different from the previous one

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template