I'm totally new to coding, and I've only dabbled in HTML & CSS at this point. I'm trying to have my navigation bar spread to the very edges of the browser rather than there being white space in between.
I was able to accomplish this by adding negative margins, but that doesn't seem like an intuitive fix. Is there any method that's easier or more logical than negative margins?
CSS:
#top-nav {
    overflow: hidden;
    background-color: #f1f1f1;
    margin-left: -10px;
    margin-right: -10px;
    margin-top: -10px; 
}
#top-nav a {
    float: left;
    color: black;
    text-align: center;
    padding: 14px;
    line-height: 25px;
}
#top-nav :hover {
    background-color: darkgray;
}