Header items not spaced

No description
6 Replies
13eck
13eck•4w ago
What's your code look like? It all looks evenly spaces to me 🤷
Conker
ConkerOP•4w ago
hello i probaly wsnt clear i mean the list html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!---Names the document -->
<title>Portifolio website</title>
<!---Links stylesheet -->
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css">
</head>
<body>

<header class="header">
<a href="#" class="logo"><span>Conker</span></a>
<ul class="nav--Links">
<li>
<a href="#About">About</a>
</li>
<li>
<a href="#Experience">Experience</a>
</li>
<li>
<a href="#Projects">Projects</a>
</li>
<li>
<a href="#Contact">Contact</a>
</li>
</ul>
<i class="fa-solid fa-bars" id="menu-icon"></i>
<button class="visit-btn">Visit Github</button>
</header>
<!---Links script -->
<script src="script.js"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!---Names the document -->
<title>Portifolio website</title>
<!---Links stylesheet -->
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css">
</head>
<body>

<header class="header">
<a href="#" class="logo"><span>Conker</span></a>
<ul class="nav--Links">
<li>
<a href="#About">About</a>
</li>
<li>
<a href="#Experience">Experience</a>
</li>
<li>
<a href="#Projects">Projects</a>
</li>
<li>
<a href="#Contact">Contact</a>
</li>
</ul>
<i class="fa-solid fa-bars" id="menu-icon"></i>
<button class="visit-btn">Visit Github</button>
</header>
<!---Links script -->
<script src="script.js"></script>
</body>
</html>
css
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins';
text-decoration: none;
scroll-behavior: smooth;
list-style-type: none;
}
header {
position: fixed;
top: 1rem;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 2rem;
align-items: center;
justify-content: center;
background-color: rgba(0,0,0,0.8);
backdrop-filter: blur(8px);
color:white;
padding: 0.5rem 1.5rem;
border-radius: 3rem;
z-index: 1000;
}
.nav--links{
display: flex;
flex-direction: column;
gap: 5rem;
}
.logo{
color:white;
font-size: 1.5rem;
font-weight: 600;
text-wrap: nowrap;
transition: 0.3s ease-in-out;

}

.logo:hover{
transform: scale(1.1);

}
.nav-links{
display: flex;
gap: 2rem;
}

li a{
position:relative;
color:white;
font-weight: 300;
}
li a::before{
position: absolute;
content:'';
width: 0;
left: 0;
height: 5px;
top: 25px;
border-radius: 1rem;
transition: 0.3 ease-in-out;
background: linear-gradient(to right, white,grey);
}

li a:hover::before{
width: 100%;
}
.visit-btn{
padding: 0.8rem 1.5rem;
border-radius: 3rem;
border: none;
font-weight:500;
color: white;
cursor: pointer;
text-wrap: nowrap;
transition: 0.3s ease-in-out;
background: linear-gradient(to right, white,grey);
}
.visit-btn{
background: linear-gradient(to right, grey white);
transform: scale(1.1);
transition: 0.3s ease-in-out;
}
.visit-btn:hover{
transform: scale(1.3);
}
menu-icon{
font-size: 2rem;
display:none;
}
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins';
text-decoration: none;
scroll-behavior: smooth;
list-style-type: none;
}
header {
position: fixed;
top: 1rem;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 2rem;
align-items: center;
justify-content: center;
background-color: rgba(0,0,0,0.8);
backdrop-filter: blur(8px);
color:white;
padding: 0.5rem 1.5rem;
border-radius: 3rem;
z-index: 1000;
}
.nav--links{
display: flex;
flex-direction: column;
gap: 5rem;
}
.logo{
color:white;
font-size: 1.5rem;
font-weight: 600;
text-wrap: nowrap;
transition: 0.3s ease-in-out;

}

.logo:hover{
transform: scale(1.1);

}
.nav-links{
display: flex;
gap: 2rem;
}

li a{
position:relative;
color:white;
font-weight: 300;
}
li a::before{
position: absolute;
content:'';
width: 0;
left: 0;
height: 5px;
top: 25px;
border-radius: 1rem;
transition: 0.3 ease-in-out;
background: linear-gradient(to right, white,grey);
}

li a:hover::before{
width: 100%;
}
.visit-btn{
padding: 0.8rem 1.5rem;
border-radius: 3rem;
border: none;
font-weight:500;
color: white;
cursor: pointer;
text-wrap: nowrap;
transition: 0.3s ease-in-out;
background: linear-gradient(to right, white,grey);
}
.visit-btn{
background: linear-gradient(to right, grey white);
transform: scale(1.1);
transition: 0.3s ease-in-out;
}
.visit-btn:hover{
transform: scale(1.3);
}
menu-icon{
font-size: 2rem;
display:none;
}
13eck
13eck•4w ago
What do you think it should be doing?
capt_uhu
capt_uhu•4w ago
not sure if this helps but your class="nav--Links" doesn't match your .nav-links in the CSS. One has a capital L, the other a lower case l
Conker
ConkerOP•4w ago
No description
Conker
ConkerOP•4w ago
thank you i got it working

Did you find this page helpful?