Home >Web Front-end >HTML Tutorial >padding is interpreted differently under ie and chrome_html/css_WEB-ITnose

padding is interpreted differently under ie and chrome_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:11:141406browse

The style sheet has padding: 0px 6px 2px;

The padding displayed under ie7 and ie8 is wider, and chrome is normal

The page defines

Reply to the discussion (solution)

Why is there no need for a doctype statement? This is the basis for parsing the entire page's css box world. Without this, The ie family is definitely different from the ff family.

The first line must add a dtd statement. The result without dtd is that ie6, 7, 8, and 9 render the page in the ie5 way, which is the quirks in document mode after opening f12 in ie7, 8, and 9. model. This mode will cause css box model calculation errors, margin:0 auto; cannot be centered.
can only be centered in body{text-align:center;}, but this will center all the content on the page, so please add dtd
dtd must appear in the first line of the page.
xhtml-dtd:
"http://www.w3.org/TR/xhtml1/DTD /xhtml1-transitional.dtd">
html5-dtd:


It is best to add dtd when writing html css. If it is not compatible, it is more difficult to adjust.

The original poster wrote padding:0px 6px 2px; on what tag does it apply?


For example, tags such as h1-6 p will have default margin padding. The original poster searched for reset css

The pages are all in the background. Because of the iframe, the doctype page scroll bar is used There are many problems, so

is discarded. The problem is the class that acts on button


After adding doctype, the vertical scroll bar under ie7 fails

The vertical scroll bar is only half, and the following I can’t see the triangle

Paste the code, I guess that’s not the solution.

Post the code or send a picture. . . No picture, no truth. .

.right{

position:absolute;

top:66px;
right:0px;
bottom:0px;
left:180px;
z-index :8;
}

.rightmain iframe{
height:100%;
width:100%;
position:absolute;
overflow:auto;
z-index:20;
}

body.module{
overflow:scroll;
overflow-x:hidden;
background-color:#f8f8f8;
height ; , what can you do

Statement:
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