2017-02-27 30 views
0

^標題實際上如何讓選框進入我的徽標背後?

我想把我的選框放在我的標題後面我的標誌。我該怎麼做呢?

我已經嘗試了很多東西,問我的同學,但沒有人提出了一個想法。

所以這裏是我的html代碼

​​

這裏是我的CSS(使用了大量的類)

.slideshow { 
      height: 400px; 
      width: 600px; 
      display: block; 
      margin: 0 auto; 
     } 

     .slideshow2 { 
      text-align: center; 
      background-color: burlywood; 
      font-family: sans-serif; 
      font-size: 20px; 
      color: chocolate; 
      margin: 0; 
      padding: 0; 
     } 

     .sd3 { 
      text-decoration: underline; 
      color: darkgoldenrod; 
     } 

     .filler { 
      color: bisque; 
      background-color: bisque; 
      font-size: 34px; 
      padding-right: 16px; 
     } 

     .title { 
      background-color: burlywood; 
      color:#382E1C; 
      font-size: 30px; 
      font-family: sans-serif;  
     } 

     .img1 { 
      width: 500px; 
      height: 300px; 
      margin: 0; 
      padding: 0; 
     } 

     .bg { 
      background-color: #BAA378; 
      text-align: center; 
     } 

     .par{ 
      background-color: #BAA378; 
      font-family: sans-serif; 
      font-size: 30px; 
      color: #453823; 
      margin: 0; 
      padding: 0; 
     } 

     .pricedesc { 
      background-color: chocolate; 
      color:#382E1C; 
      font-size: 30px; 
      font-family: sans-serif; 
      margin: 0; 
      padding: 0; 
     } 

     .logo { 
      position: absolute; 
      z-index: 10; 
      opacity: 0.75; 
      width: 225px; 
      height: 125px; 
      display: block; 
      margin: 0 auto; 
     } 

     .filler { 
      color: bisque; 
      background-color: bisque; 
      font-size: 34px; 
      padding-right: 16px; 
     } 

     body { 
      background-color: cornsilk; 
      width:100%; 
     } 

     .navbar{ 
      list-style-type: none; 
      margin: 0; 
      padding: 0; 
     } 

     li { 
      float: left; 
     } 

     li a { 
      font-size: 20px; 
      font-family: sans-serif; 
      display: block; 
      padding: 8px; 
      background-color: bisque; 
      color: chocolate; 
      text-decoration: none; 
      text-align: center; 
     } 

     li a:hover { 
      background-color: burlywood; 
     } 

     .active { 
      background-color:chocolate; 
      color: beige; 
     } 

     h1 { 
      padding-top: 10px; 
      padding-bottom: 10px; 
      padding-left: 10px; 
      background-color: coral; 
      color:blanchedalmond; 
      text-align: center 
     } 
+2

請將您的代碼添加到您的問題 –

+2

'我已經嘗試了很多東西' - 請發佈HTML,腳本,CSS等..任何你已經嘗試過,所以我們可以看看爲什麼它不'工作。有關更多信息,請參見[如何創建最小,完整和可驗證示例](http://stackoverflow.com/help/mcve)。 – Nope

+0

你可以請你把迄今爲止已經嘗試過的一些示例代碼? –

回答

0

您可以絕對定位的形象,並給它一些更高z-index

img { 
 
    position: absolute; 
 
    z-index: 10; 
 
    opacity: 0.75; 
 
}
<img src="https://unsplash.it/200/200"> 
 
<marquee>marquee text goes here</marquee>

我已經使圖像透明,所以你可以看到它下面的文本。

+0

我試過了,但徽標出現在導航欄中。 [for context](http://imgur.com/gallery/dP7f8) – teendoinghisprojects

+0

您需要將菜單向右推,添加一個225px左右的邊距或填充(您的徽標的寬度) – pol

+0

,所以我會'漂浮:left;'在我的導航欄上做'margin-left:225px;'在logo上? – teendoinghisprojects

相關問題