After doing some research online, I've come across advice on how to remove the space at the top of a web page which usually involves setting the margin and padding of the body element to 0:
body {
margin: 0;
padding: 0;
}
You can find more information about this topic here.
If you take a look at the web page I'm currently designing: , you'll notice that there is an issue with extra space at the top.
While following a styling tutorial on Treehouse, I discovered that adding float: left;
to the header element is causing the space at the top of the page. The tutorial mentioned that it shouldn't have any effect now, but will be important for the desktop version of the site.
The tutorial was created a few years ago, so things might have changed in terms of browser behavior. I'm curious if someone could explain why floating the header element is creating the space at the top of the page even though the body has no padding or margin and the header itself has no top margin?