Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 页面以某种方式显示在屏幕的左侧_Android_Css_Internet Explorer_Mobile_Alignment - Fatal编程技术网

Android 页面以某种方式显示在屏幕的左侧

Android 页面以某种方式显示在屏幕的左侧,android,css,internet-explorer,mobile,alignment,Android,Css,Internet Explorer,Mobile,Alignment,我在几个设备和浏览器(PC、平板电脑、iPad、android手机)上测试了一个网页,一切都很好 我发现的唯一问题是当我使用安卓手机测试网页时,使用IE作为浏览器 网页不知何故被推到了屏幕的左侧,导航链接没有正确对齐。 只有在android手机上通过Internet Explorer进行查看时,才会发生这种情况 知道为什么会发生这种情况以及如何修复吗 以下是网页: 以下是CSS: /*CSS RESET*/ html, body { margin:0; padding:0;

我在几个设备和浏览器(PC、平板电脑、iPad、android手机)上测试了一个网页,一切都很好

我发现的唯一问题是当我使用安卓手机测试网页时,使用IE作为浏览器

网页不知何故被推到了屏幕的左侧,导航链接没有正确对齐。 只有在android手机上通过Internet Explorer进行查看时,才会发生这种情况

知道为什么会发生这种情况以及如何修复吗

以下是网页: 以下是CSS:

/*CSS RESET*/
html, body {
    margin:0;
    padding:0;
    height:100%;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-style: inherit;
    vertical-align: baseline;
}


a img { 
    border: none; 
}

a:link {
    color:#666;
    text-decoration: none;
    border:none;
}

a:hover {
    color:#0373ED;
}

a:visited{
    color:#666;
}
#container {
    min-height:100%;
    position:relative;
}
#header {
    padding:10px;
    background-color: #FFF;
}

.wrapHeader {
    position:relative;
    width:960px;
    background-color: #FFF;
    height: 149px;
    margin-top: 0;
    margin-right: auto;
    margin-bottom: 0;
    margin-left: auto;
}

.logo {
    float:left;
    width:297px;
    height: 148px;
}
.nav {
    font-size: 16px;
    color: #666;
    float: left;
    width: 663px;
    position: relative;
    top: 75px;
    text-transform: uppercase;
    z-index: 1;
    text-indent: 135px;
}


#body {
    padding:10px;
    padding-bottom:60px;    /* Height of the footer */
}
.wrapContent {
    position:relative;
    width:900px;
    background-color: #FFF;
    height: auto;
    margin-top: 0;
    margin-right: auto;
    margin-bottom: 0;
    margin-left: auto;
    line-height: 1.4;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
}
#footer {
    position:absolute;
    bottom:0;
    width:100%;
    height:60px;
    background-color: #333;
    padding-top: 10px;
}


#footer p {
    margin:0;
    padding:10px;
}
.wrapFooter {
    position:relative;
    width:500px;
    background-color: #333;
    color: #CCC;
    margin-top: 0;
    margin-right: auto;
    margin-bottom: 0;
    margin-left: auto;
    text-align: center;
    top: 10px;
}
</style>

<!--[if lt IE 7]>
    <style media="screen" type="text/css">
    #container {
        height:100%;
    }
    </style>
<![endif]-->
/*CSS重置*/
html,正文{
保证金:0;
填充:0;
身高:100%;
}
h1、h2、h3、h4、h5、h6{
保证金:0;
填充:0;
边界:0;
大纲:0;
字体风格:继承;
垂直对齐:基线;
}
一个img{
边界:无;
}
a:链接{
颜色:#666;
文字装饰:无;
边界:无;
}
a:悬停{
颜色:#0373ED;
}
a:参观了{
颜色:#666;
}
#容器{
最小高度:100%;
位置:相对位置;
}
#标题{
填充:10px;
背景色:#FFF;
}
wrapHeader先生{
位置:相对位置;
宽度:960px;
背景色:#FFF;
高度:149px;
边际上限:0;
右边距:自动;
页边距底部:0;
左边距:自动;
}
.标志{
浮动:左;
宽度:297px;
高度:148px;
}
.导航{
字体大小:16px;
颜色:#666;
浮动:左;
宽度:663px;
位置:相对位置;
顶部:75px;
文本转换:大写;
z指数:1;
文本缩进:135px;
}
#身体{
填充:10px;
填充底部:60px;/*页脚高度*/
}
.包装内容{
位置:相对位置;
宽度:900px;
背景色:#FFF;
高度:自动;
边际上限:0;
右边距:自动;
页边距底部:0;
左边距:自动;
线高:1.4;
字体系列:Verdana、Arial、Helvetica、无衬线;
字体大小:12px;
}
#页脚{
位置:绝对位置;
底部:0;
宽度:100%;
高度:60px;
背景色:#333;
填充顶部:10px;
}
#页脚p{
保证金:0;
填充:10px;
}
wrapFooter先生{
位置:相对位置;
宽度:500px;
背景色:#333;
颜色:#CCC;
边际上限:0;
右边距:自动;
页边距底部:0;
左边距:自动;
文本对齐:居中;
顶部:10px;
}

由于我没有您提到的测试环境,我无法给出精确的解决方案,但通常情况下,当事情向左对齐时,这是因为您没有边距:0自动;关于某件事。这至少是我的经历

看起来你的容器里没有这个。身体也不会

我也会改变你所有的想法

margin-top: 0;
margin-right: auto;
margin-bottom: 0;
margin-left: auto;


在CSS文件中确实有一些HTML(样式标记和IE注释)。这可能不是问题的原因,但我认为如果没有它们的话还是值得一试的,以防万一。那么,你到底在哪个平台上看到这个?
margin: 0 auto;