2014-01-27 161 views
3

我有我的website,如果向上滾動,您會看到標題正好在中心線上方。我無法弄清楚如何讓它和紫色的一樣。有任何想法嗎?標題不垂直對齊

代碼綠色頁標題:

.main section.page3 h1 { 
     text-align: center; 
     padding: 0; 
     margin-bottom: 0; 
     font-size: 70px; 
     letter-spacing: -1px; 
     color: black; 
    } 

,紫頁:

.main section.page2 > img { 
     position: absolute; 
     top: -300px; 
     left: 50%; 
     margin-left: -1095px; 

我有什麼:

enter image description here

我想要什麼: enter image description here

回答

3

我在開發人員工具中查看了它,看起來您只需刪除一些邊距。他們在.page2 .page_container元素上,並且.page2 h1元素:

.main section.page2 .page_container { 
    margin-top: 240px;     /* Remove this. */ 
    overflow: hidden; 
} 
.main section.page2 h1 { 
    text-align: center; 
    padding: 0; 
    margin-top: 150px;     /* Remove this. */ 
    font-size: 50px; 
    letter-spacing: -1px; 
    color: white; 
} 
+2

非常感謝。我一直在玩它幾個小時。 – Alex

+1

@ user3217296不客氣,很高興幫助。 –

+3

@ user3217296然後您應該將此答案標記爲已接受。 –