2013-07-24 38 views
0

不寻常的问题,我只是无法弄清楚,为什么它的发生,基本上香港专业教育学院试图通过responsinator 浏览该网站,这一切似乎罚款,调整浏览器时,它似乎也没关系(甚至在手机大小),但在iPhone上浏览网站的时候,似乎没有听过媒体查询所有..相对布局,手机版无法正常显示.. HTML/CSS

http://jsfiddle.net/z5jVJ/

验证整个CSS我得到以下

Parse Error 
@media only screen and (max-width: 600px) { 

#container { 
    margin: 0 auto; 
    max-width: 85%; 
    overflow: hidden; 
} 

nav #pull { 
    position: absolute !important; 
    top: 5px !important; 
    left: 5px !important; 
} 

nav ul { 
    display: none; 
    height: auto; 
} 

nav a#pull { 
    text-align: left; 
    margin-top: -3px; 
    font-family: 'Oswald', sans-serif; 
    font-weight: 300; 
    font-size: 18px; 
    display: block; 
    width: 90%; 
} 

nav a#pull:after { 
    background: url('nav-icon.png') no-repeat; 
    height: 1px; 
    display: block; 
    position: absolute; 
    right: 15px; 
} 

#mainHeader nav { 
    text-align: center; 
    min-height: 25px; 
    height: 100%; 
    width: 100%; 
    border-bottom: 1px solid #dfdfdf; 
} 

#mainHeader nav ul li { 
    padding: 10px; 
    margin-top: 23px; 
    font-size: 16px; 
} 

#mainHeader nav ul li a { 
    padding: 0px; 
} 

#mainHeader nav a:hover { 
    color: #dfdfdf; 
} 

#mainHeader ul { 
    list-style: none; 
    margin: 0 auto; 
    height: 53px; 
} 

#mainHeader nav ul li a { 
    padding: 0px 0px; 
} 

.banner .label { 
    margin-bottom: 5px; 
    width: 50%; 
    -webkit-border-top-right-radius: 5px; 
    -webkit-border-bottom-right-radius: 5px; 
    -moz-border-radius-topright: 5px; 
    -moz-border-radius-bottomright: 5px; 
    border-top-right-radius: 5px; 
    border-bottom-right-radius: 5px;  
} 

.banner .category { 
    text-align: right; 
    min-width: 96.5%; 

} 

#mainContent { 
    float: right; 
    width: 100%; 
} 

#mainContent img { 
    width: 96.5%; 
} 

.article { 
    position: absolute !important; 
    top: -9999px !important; 
    left: -9999px !important; 
} 

#footer { 
    height: 50px; 
} 
    } 

任何想法?

+0

我建议_not_使用

+0

你把你的视口定义为什么? – designtocode

+0

多数民众赞成在视口,我刚刚删除了导航标签,并改变了CSS但仍然没有运气 – box

回答

1

试着改变你的媒体查询,有一个“语法错误”你确认你的CSS后。

所以更改此设置:

@media only screen and (max-width: 600px) 

要这样:

@media only screen and (max-device-width: 480px)