I'm currently working on an html/css page and trying to align the items of the agenda class in the same row, centered on the page.
https://i.sstatic.net/8TjG8.png
Here's the code I've been using:
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Fishing Guide Santos</title>
<link href="css/Style2.css" rel="stylesheet " />
<style>
.img {
height: 150px;
width: 150px;
object-fit: cover;
float: left;
}
.whatsapp {
position: fixed;
bottom: 200px;
right: 50px;
z-index: 9999;
}
.menu {
display: flex;
align-items: center;
}
.container {
background-color: khaki;
height: 100vh;
margin: 5%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
</style>
<meta name="viewport" content="width=device-width" , initial-scale=1.0, maxime-scale=1.0>
</head>
<body>
<header>
<div class="center">
<div class="logo"><img src="img/logoDan.jpeg" class="img" />
</div>
<!--Logo-->
<div class="menu">
<!--Menu-->
<a href="Index2.html">Home</a>
<a href="Embarcacoes.html">Boats</a>
<a href="Agenda.html">Agenda</a>
<a href="Galleria.html">Gallery</a>
<a href="Contato.html">Contact</a>
</div>
</div>
<div class="agenda">
<a href="#catalog">Xu</a>
<a href="#about">Xalana</a>
<a href="#feature">Free Willy</a>
</div>
</header>
<div class="whatsapp">
<a href="https://wa.me//5511950758677?
text=Hello!_Would_you_like_to_go_fishing_with_us" target="_blank">
<img src="img/124034.png " width="100" hight="100" alt="Call us on WhatsApp" title="Get in Touch" />
</a>
</div>
<div class="container">
</div>
</body>
</html>
As well as this css style page:
body {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.header {
padding: 20px 0;
display: flex;
flex-direction: row;
}
.center {
display: flex;
flex-wrap: wrap;
max-width: 1100px;
margin: 0 auto;
padding: 0 2%;
}
.logo {
width: 50%;
text-align: right;
}
.menu a {
top: 100px;
color: black;
text-decoration: none;
font-weight: bold;
margin-right: 15px;
display: flex;
align-items: center;
}
.barcos a {
top: 100px;
color: black;
text-decoration: none;
font-weight: bold;
margin-right: 15px;
display: flex;
align-items: center;
}
nav ul {
display: flex;
flex-direction: row;
}
nav ul li {
list-style: none;
padding: 10px;
cursor: pointer;
}
.agenda a {
top: 100px;
color: black;
text-decoration: none;
font-weight: bold;
margin-right: 15px;
display: flex;
flex-direction: row;
align-items: center;
}
Can anyone help me figure out why XU, Xalana, and Free Willy are not displaying on the same row like the "menu" class items?
Thank you for any assistance.