html - Element doesn't begin in the top left corner -


i'm making simple website, i'm new , i'm wondering something. i've made header navbar , want width of screen , way top. however, 0,0 isn't @ top left corner , need add left margin value of -8px , top margin of -16px. why? wrong in thinking should upper left corner start with? have missed something?

.header {     background-color: rgba(0,0,0,0.50);     margin: -8px;     margin-top: -16px;     width: 100%;     position: fixed; } 

there browser specific default styles. need override those. need add additional styles

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

Comments