php - CSS Internet Explorer 浏览器差异

标签 php html css internet-explorer browser

出于某种原因,在 Internet Explorer 中,单词的缩进比 Chrome 或 Safari 中显示的要远。这是否有可能是由于各种浏览器的 CSS 差异所致?

<div class="container">
<div class="centered">
<?php 

    echo "<a href='/LOGO'>LOGO</a>";
?>
</div>
</div>

//CSS

.centered
{
position:relative;
margin:0 auto;
width: 954px;   
}
.container
{
width:100%;
border-bottom: 1px solid gray;
font-size: 27px;
background: #4D94DB;
color: black;
    min-height: 37px;
}

最佳答案

在第一行使用这个 css reset:

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, caption {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-size: 100%;
    vertical-align: baseline;
    background: transparent;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}

/* remember to define focus styles! */
:focus {
    outline: 0;
}

/* remember to highlight inserts somehow! */
ins {
    text-decoration: none;
}
del {
    text-decoration: line-through;
}

/* tables still need 'cellspacing="0"' in the markup */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

引用 Reset CSS

关于php - CSS Internet Explorer 浏览器差异,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22275466/

相关文章:

php - 如何将 URL 参数从路由传递到中间件?

php - 如何获取 %SQL% 之前和之后的 50 个字符?

php - 带有自定义对象的 Silverstripe 下拉菜单

php - Div 样式为表单输入的表而不呈现

html - 如何设置列表样式以在 html 中显示为两个列

html - CSS margin-top 是不正确的值

php - 如何在 Yii2 中创建控制台命令(rake 任务)?

javascript - 心率监测器

html - 悬停状态时在按钮底部显示工具提示

php - 如何在 PHP 中改进以下代码