2017-09-29 68 views
0

我在製作一個網站。在其頁腳我有一個標誌。這是在正確的地方,但當我用手機訪問該網站時,標誌位置錯誤。HTML徽標沒有響應

它在工作之前,現在不是。我無法弄清楚爲什麼。這裏是我的代碼:

HTML

<footer class="page-foot bg-dark"> 
    <section class="footer-content"> 
     <div class="container"> 
     <div class="rd-navbar-brand pull-lg-left"><a href="index.html" 
class="brand-name"> 
<img src="logo1.png" style="width: 35%" width="120px">    
</div> 
     <div style="text-align: left;"> 
     <ul class="list-inline list-inline-mod-1 visible-md-inline-block 
visible-lg-inline-block pull-sm-right"> 
      <li><a href="meadows.html">Rolling Meadows</a></li> 
      <li><a href="heights.html">Attorney Arlington Heights</a></li> 
      <li><a href="palatine.html">Lawyer Palatine </a></li> 
      <li><a href="mount.html">Attorney Mount Prospect</a></li> 
      <li><a href="des.html">Lawyer Des Plaines</a></li> 
      <li><a href="scha.html">Attorney Schaumburg</a></li> 
      <li><a href="hoff.html">Hoffman Estates</a></li> 
      <li><a href="elk.html">Attorney Elk Grove Village</a></li> 
     </ul> 
     </div> 
     </div> 
    </section> 
    </footer> 

CSS它指定爲標誌

.page-foot .rd-navbar-brand { 
    margin-bottom: -4%; 
    margin-left: -18%; 
} 

CSSHTML是新的位置,你能解釋一下爲什麼會這樣?

+0

你是什麼意思,它不工作?它沒有顯示標誌?或者標識被拉伸,扭曲等? –

+0

它不在正確的位置,它遠離了頁腳 –

+0

它有多遠?像屏幕頂部或只是移動了一些? –

回答

0

.page-foot .rd-navbar-brand在它上面有負邊距 - 取下它們,它應該回到正確的位置!添加了一些底部填充,使徽標在頂部/底部具有相同的填充。

@media (max-width: 767px){ 
    .page-foot .rd-navbar-brand{ 
    margin: 0 0 30px; 
    } 
} 
+0

但是,如果我刪除 - 它在移動版本上的權利的地方,但在電腦上它的錯誤 –

+0

添加媒體查詢重置邊距,編輯上面的一個例子 – will

+0

哦,還有一個問題 - 如何處理這個?以iPad的分辨率爲例查看頁腳。 http://quirktools.com/screenfly/#u=http%3A//testwebsites.9e.cz/index.html&w=1024&h=768&a=22&s=1 –