: And issue I have this meticulous problem, I have a test html page whose body content is a single div tag. I made the width and height of the div tag to 100% and colored the background
I have this meticulous problem,
I have a test html page whose body content is a single div tag.
I made the width and height of the div tag to 100% and colored the background red.
And I get irritated by the white space border around the div tag.
So my questions are:
What is the white space border around that div element?
How do I manipulate it OR get rid of it?
More posts by @Karen161
1 Comments
Sorted by latest first Latest Oldest Best
You can use CSS to remove it.
Before and After.
Just inserted
body, html {
border: 0;
height: 100%;
margin: 0;
padding: 0;
width: 100%;
}
into the CSS. You have to set the height (and occasionally on mobile devices the width too) to 100% in order for the div to follow suit. Then changing the border, margin and padding to 0 (no px, etc) has stood me well for years. Although the floor is open to alternatives.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.