Orkun Oz Orkun Oz - 1 year ago 85
CSS Question

Navbar doesn't fit to top

I'm stuck with positioning.

margin: 0;
padding: 0;
font-family: 'Consolas';
letter-spacing: 2px

.navbar {
background-color: #595959;
color: #ffffff;
list-style: none;
text-align: center;
padding: 20px 0 20px 0;


As you can see, even I set
to 0. it doesn't fit to top. ( I mean this grey line above the navbar.)

Answer Source

Guessing that your navbar is done with ul/li you need to reset the padding from ul

so set padding:0 to ul

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download