Extra White space in top of html page

Viewed 28

Just created a new react app using create-react-app and run it on browser. I got extra white space just above the body content. On inspecting, browser showed that white space is coming from HTML tag. Am in safari Version 15.6.1 (17613.3.9.1.16), Mac OS 12.5.1 (21G83). How to get rid off this white space and make my page to fill the whole screen. [attached screen shots]. It happens in both Edge and Safari browser. Edge version is Version 105.0.1343.27 (Official build) (x86_64)

I already tried settings margin, padding to html, body tags but none helped

In safari

In edge

1 Answers

can you set the html to padding 0 and marging 0px

in your CSS file

* {
margin:0;
padding:0;
}
  • indicate all the elements in the document.
Related