ozzymagnum
New Coder
I am trying to add a second image to HTML but it doesnt show on the website. I am talking about ''Bild2'' that is in HTML.
CSS:
.flex-container{
display: flex;
}
.container {
position: relative; /* Make the container a positioning context */
width: 1178px; /* Set the width of the container */
height: 1000px; /* Set the height of the container */
background: url('Bild1.jpg') no-repeat center center;
background-size: cover; /* Make the image cover the container */
margin-top: -35px
}
nav {
position: absolute; /* Position the navigation menu absolutely */
top: 20px; /* Adjust the top value to move the menu down as needed */
left: 0;
right: 0; /* Right should be 0 to stretch the menu across the container */
}
ul {
list-style-type: none;
padding: 20;
margin: 30px;
position: absolute; /* Position the <ul> absolutely */
top: 10px; /* Adjust the top value to change the vertical position */
left: -27px;
}
li {
display: inline;
margin-right: 20px;
margin-top: 20px;
}
a {
text-decoration: none;
color: #ffffff;
font-family: 'Poppins', sans-serif;
}
.flex-container.right img {
margin-right: 300px; /* Move the image 20 pixels to the right */
margin-top: 70px; /* Move the image 10 pixels down */
}
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet">
<link rel="stylesheet" href="munamii.css">
<title>Munamii Cakery</title>
</head>
<body>
<header>
<nav>
<div class="container">
<div class="flex-container left">
<ul>
<li><a href="#">Butik</a></li>
<li><a href="#">Om Oss</a></li>
<li><a href="#">Adress</a></li>
<li><a href="#">Kontakta Oss</a></li>
</ul>
</div>
</div>
</nav>
</header>
<div class="flex-container right">
<img src="Bild2.jpg" alt="">
</div>
<main>
</main>
<footer>
</footer>
</body>
</html>