Ich lerne HTML und CSS vom Freecodecamp. Mit all dem Bootstrap-Code bin ich ein bisschen verwirrt.Probleme mit Navtab
Hier ist mein Code:
h1 {
text-align: center;
letter-spacing: 5px;
color: coral;
font-family: verdana;
}
ul {
height: 20%;
background-color: darkgrey;
list-style-type: none;
display: solid;
}
li {
display: inline-block;
padding: 0% 5% 0% 5%;
text-align:
}
#first {
margin: 0% 0% 0% 30%;
}
li:hover {
background-color: bisque;
text-decoration: none;
}
<h1> Test Website </h1>
<div class="container-fluid">
<div class="menu">
<div id="tope"></div>
<ul id="navbar">
<li id="first"><a href="www.a.com"> Us </a></li>
<li><a href="www.b.com"> Work </a></li>
<li id="last"><a href="www.c.com"> Vids and photos </a></li>
</ul>
</div>
</div>
Demo: CodePen.
Das Problem, dass ich kämpfe ist, dass meine navtab (eigentlich alle <li>
Elemente) nicht den Haupttitel <h1>
Element folgen, wenn ich die Größe des Bildschirms.
Ich möchte eine Art Grid-System zu machen, wo meine <li>
in Bezug auf die <h1>
zentriert sind, aber ohne Bootstrap. Ist das möglich? Wenn das so ist, wie?