2016-11-21 3 views
0

Ich versuche, Top-Menü für diese Website hinzuzufügen, aber es fügt nur "Ränder" für das Topmenü hinzu.Wie "Rand" in HTML-Navbar entfernen?

enter image description here

body { 
 
    background-color: #2E3058; 
 
    font-family: 'sans-sefir'; 
 
} 
 
#topMenu { 
 
    width: 100%; 
 
    height: 50px; 
 
    margin: 0; 
 
    padding: 0; 
 
    border-bottom: 1px solid #ccc; 
 
    background-color: #3A3D70; 
 
}
<div id="topMenu"> 
 
    <button class="topMenuBtn">Home</button> 
 
    <button class="topMenuBtn">Forum</button> 
 
    <button class="topMenuBtn">About</button> 
 
</div>

+0

topMenu entfernen: Höhe – Nosyara

+0

Können Sie ein Bild Ihres erwarteten Ergebnisses hinzufügen? –

+0

Sie meinen Körper würde diese Ränder hinzufügen? – jeepingviini

Antwort

0

body { 
 
    background-color: #2E3058; 
 
    font-family: 'sans-sefir'; 
 
} 
 
#topMenu { 
 
    width: 100%; 
 
    margin: 0; 
 
    padding: 0; 
 
    border-bottom: 1px solid #ccc; 
 
    background-color: #3A3D70; 
 
}
<div id="topMenu"> 
 
    <button class="topMenuBtn">Home</button> 
 
    <button class="topMenuBtn">Forum</button> 
 
    <button class="topMenuBtn">About</button> 
 
</div>

entfernen Sie die Höhe Teil aus der CSS-Datei

+0

Ich denke nicht, dass das sowieso helfen würde und ich habe bereits Hilfe in den Kommentaren bekommen, mit 'html, body {margin: 0; padding: 0} 'hat funktioniert. – jeepingviini

+0

Danke trotzdem. – jeepingviini