2013-07-24 35 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)