2013-01-15 48 views
0

在此website我需要添加鏈接到谷歌+和Facebook。我無法獲得CSS我生效的div框。我也嘗試添加帶有img標籤的圖片,但即使它看起來是正確的目錄,而其他圖像具有相同的目錄,我也無法加載圖片。 我想將2個圖標添加到菜單欄的右側。可溼性粉劑 - 不能樣式框或加載圖片?

HTML:

<div class="art-nav"> 
    <ul class="art-menu"> 
     <?php art_menu_items(); ?> 
    </ul> 
    <div id="facebooktopmarc"> 
     <a href="https://www.facebook.com/raadmal"> 
      <img src="images/facebook.png" alt="Go to Facebook!"/> 
     </a> 
    </div> 
    <div id="googleplustopmarc"> 
     <a href="https://www.facebook.com/"> 
      <img src="images/google-plus.png" alt="Go to Google-plus!"/> 
     </a> 
    </div> 
</div> 

CSS:

#facebooktopmarc { 
    background-image: url("images/facebook.png"); 
    background-position: right center; 
    background-repeat: no-repeat; 
    display: block; 
    float: right; 
    height: 25px; 
    margin: 0 5px 0 0; 
    position: relative; 
    width: 25px; 
} 

#googleplustopmarc { 
    background-image: url("images/google-plus.png"); 
    background-position: right center; 
    background-repeat: no-repeat; 
    display: block; 
    float: right; 
    height: 25px; 
    margin: 0 5px 0 0; 
    position: relative; 
    width: 25px; 
} 

回答

1

CSS裏面提供網址,是關係到文件系統這個CSS文件的位置。如果你想在html裏面使用img,你應該使用相對於這個html的路徑或者帶有域名的絕對路徑。

您的影像出現的URL

http://raad-mal.dk/wp-content/themes/green_room/images/facebook.png 
http://raad-mal.dk/wp-content/themes/green_room/images/google-plus.png 
+0

THX現在我得到的圖像顯示,但我還是不能風格的股利,所以我不能走高菜單欄上。對此有何想法? :) – McKeene

+0

我找不到#facebooktopmarc和#googleplustopmarc在css上http://raad-mal.dk/。你確定它已經在那裏? – antejan

+0

啊,我一直在做我的備份並上傳了原版。傻我。 Thx很多幫助:) – McKeene

相關問題