My attempt to center my title "Scream" is not working as expected. Here is how it looks: Visit this link for visualization.
I have tried using justify, align, and text-align properties in my CSS code but the title (titulo) remains misaligned. Surprisingly, it worked perfectly fine on a different project. I am unable to identify my mistake. Any assistance or tips will be greatly appreciated. Thank you!
Below is the CSS code snippet:
*{
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: 'Saira Condensed', sans-serif;
font-size: 40px;
}
/* TITULO */
.titulo {
background-color: #ffffff;
text-align: center;
color: rgb(0, 0, 0);
padding: 50px;
justify-content: center;
display: flex;
align-items: center;
}
/* NAVEGADOR */
.navegador {
background-color: #ffffff;
padding: 10px;
text-align: center;
}
.navegador ul {
list-style: none;
margin: 0;
padding: 0;
}
.navegador li {
display: inline-block;
margin: 0 20px;
}
.navegador a {
text-decoration: none;
color: #000000;
font-weight: bold;
font-size: 30px;
transition: all 0.3s;
display: inline-block;
padding: 10px 20px;
}
.navegador a:hover {
color: #ffffff;
transform: scale(1.1);
background-color: #000000;
clip-path: circle(50% at 50% 50%);
}
Here is the HTML code snippet:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SCREAM</title>
<link href="style.css" rel="stylesheet" type="text/css"/>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@100&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<section id="titulo">
<h1>SCREAM</h1>
</section>
<main id="volver">
<header class="header">
<nav class="navegador">
<ul>
<li><a href="#productos">Productos</a></li>
<li><a href="#nosotros">Nosotros</a></li>
<li><a href="#categorias">Categorias</a></li>
<li><a href="#sumate">Sumate</a></li>
</ul>
</nav>
</header>
</body>
</html>