-3

Web Page

In the above web page photo I have taken a <div> with height : 100vh; and width : 100%;

I don't want the white body border.

Someone please help !!!

Shilesh
  • 9
  • 1
  • 7

4 Answers4

1

Well, that margin is there because the body element has a default margin, set by the browser. To get rid of it, you need to set margin: 0 on the body element.

This question has actually been asked many times before, in various ways. For future questions you may have, it may be useful to take the follow steps;

  1. Open the developer tools in your browser
    1. Chrome Developer Tools
    2. Safari Developer tools
    3. Firefox Web Console
  2. Inspect the elements to see which one is the problem
  3. Search Google, or StackOverflow for questions with similar scenarios as yourself
  4. If, after inspecting and googling, you still cannot solve your problem; post a question on here, along with examples of your code, and details of your research. Having more information definitely helps us to figure out your problem.
Brayniverse
  • 260
  • 3
  • 15
0

As you haven't add any coding.So in general you can add this and try:

width:100%;
    max-width:100%;
    margin-left:auto;
    margin-right:auto;
aarju mishra
  • 710
  • 3
  • 10
0

I think this is an issue with default padding or margin creating a white border... Add the below to ur css....

.your_div_class{
    width:100%;
    height:100%;
    padding:0px;
    margin:0px;
}
0

Use that code on your style or .css file and you'll be fine:

body { height: 100%; width: 100%; margin: 0px;