2017-10-11 44 views
-1

鏈接全部水平對齊,直到我將它們中的一個放入它自己的div中,以便在我鏈接到的頁面上時更改它的顏色。鏈接不內聯,因爲在它自己的div?

現在我不能讓他回去排隊。

<div class="navigation"> 
    <a href="./productions.html">Mes productions</a> 
    <a href="./DJ.html">DJ</a> 
    <a target="_blank" href="./CV.pdf">Mon CV</a> 
    <div id="contact"> 
    <a href="./contact.html">Me contacter</a> 
    </div> 
</div> 

.navigation { 
    padding: 40px 0px; 
    position: relative; 
    text-align: center; 
    width: 100%; 
    font-size: 30px; 
} 

.navigation a { 
    background: black; 
    border: 1px solid grey; 
    border-radius: 7px; 
    color: white; 
    display: inline-block; 
    margin: 100px 35px; 
    padding: 14px; 
    text-decoration: none; 
    opacity: 0.75; 
    font-family: impact; 
} 

.navigation a:hover { 
    background: white; 
    border: 1px solid black; 
    color: black; 
} 

#contact a { 
    background: white !important; 
    color: black !important; 
    display: inline-block !important; 
} 

回答

0

您需要設置display: inline-block#contact,不#contact a