Miguel Santana
Miguel Santana

Reputation: 247

White border in the "nav" part in CSS

I am coding CSS from scratch for the first time and I am getting a lot of trouble to make it the perfect way.

As you can see in this image, the blue menu in the top has a white border.

Website

My current css code for nav is:

nav, footer {
    font-family: "rogue-sans-ext", sans-serif;
    font-style: normal;
    font-weight: 700;
    border-width: 0px;
    padding: 0px 0px 0px 0px;
}

nav {
    background-color: #005EFF;
    width: 100%;
    position: static;
    top: 0;
    left: 0;
    text-align: center;
    font-size: 25px;
}

By the way, I can't figure out how to center vertically the text of the nav items. I have tried the vertical-align option, the line-height method and the absolute positioning and negative margin, but none seems to work properly.

Thanks,
mikeysantana

Upvotes: 0

Views: 203

Answers (1)

Christian Vincenzo Traina
Christian Vincenzo Traina

Reputation: 10384

Probably, your problem is given by the default body padding value applied by browser.

Try applying this style:

body, html {
  margin: 0;
  padding: 0;
}

Upvotes: 2

Related Questions