Kevin Powell - CommunityKP-C
Kevin Powell - Community14mo ago
2 replies
Phae

Navbar Overflowing with the padding

Guys, I need some help with my CSS code.
I'm new ro CSS and have been trying to develop a website for a client. At first, as a designer, my job was to get it done in figma, but he decided to have me build it and learn html/css in the proccess.
I'm now doing the navbar, here is the code:

.navbar{
  background-color: var(--mid-grey);
  border-bottom: 2px solid var(--light-grey);
  display: flex;
  padding: 8px 10%;
  position: fixed;
  gap:0.5rem;
  z-index: 10000000;
  box-shadow: 0px 3px 6px;
  width: 100%;
  align-items: center;
  justify-content: space-between;
}


The problem I'm having is that inputing the lateral paddings is making the bar overflow to the right. What am I doing wrong?
image.png
Was this page helpful?