Learning While Aging

How to make a HTML table fill the whole screen

When creating a table with width=100%, the table will not fill the whole screen and there is a thin white space between the screen and the top, left, and right side of the table. To make the table actually fill the whole screen, we need to use CSS. In the CSS file, add “margin: 0px; padding: 0px;” to the Body tag as follows:

Body
{

margin: 0px;
padding: 0px;
}

If you use FireFox, sometimes you still see the white space even you have done the above trick. The very possible reason is that there is a <p> tag around your <table> tag. Just remove the <p> tag, and the white space should disappear.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x