I wanted to have a navigation bar with images but it seems impossible to position the images in the navigation bar. Iused two images and even though I used the same code, the second one doesn´t move. I also tried changing the positions to absolute and relative, but nothing changed for the second image.
This is my code in css:
This is my code in css:
Code:
.topnav {
background-color: #b3e0ff;
color: #ffffff;
height: 8%;
padding-bottom: 20px;
margin-top: 10px;
margin-left: 150px;
margin-right: 150px;
margin-bottom: 0px;
width: 1200px;
position: sticky;
top: 0;
}
.topnav a {
list-style: none;
display: inline-block;
float: left;
text-decoration: none;
text-align: center;
font-size: 25px;
font-family: arial;
color: #ffffff;
padding: 25px 60px;
padding-bottom: 25px;
word-spacing: 10px;
}
.GriechischeFlagge img {
width: 40px;
height: 35px;
}
.GriechischeFlagge a {
top: -55px;
left: 15px;
display: inline-block;
position: sticky;
}
.Warenkorb img {
width: 65px;
height: 65px;
}
.Warenkorb a {
top: -55px;
left: 35px;
display: inline-block;
position: sticky;
}
Comment