Javascript-there is a blank section between the webpage and the browser. How can I put the webpage on the top without any gaps?

Source: Internet
Author: User
There is a blank section on the top of the webpage and browser. How can I top the webpage? All elements are in the div of a iner. This DIV sets padding-top: 0. The following code is also set for all bodies. Bodytabletrtd {code.

There is a blank section on the top of the webpage and browser. How can I top the webpage?
All elements are in the div of a iner. This DIV sets padding-top: 0;
The following code is also set for all bodies.
Body table tr td {

 topmargin="0"  leftmargin="0"  rightmargin="0" bottommargin="0" position:relative;  margin:0 auto; width:1000px;}

Please enlighten me.

Reply content:

There is a blank section on the top of the webpage and browser. How can I top the webpage?
All elements are in the div of a iner. This DIV sets padding-top: 0;
The following code is also set for all bodies.
Body table tr td {

 topmargin="0"  leftmargin="0"  rightmargin="0" bottommargin="0" position:relative;  margin:0 auto; width:1000px;}

Please enlighten me.

Body {

margin:0;padding:0;

}

LZ your Writing Method
Body table tr td {

/* some css */

}
In this way, the dom of the selector is not the body, but the td under the tr in the table below the body.
Just add a comma in the middle.
Body, table, tr, td {
/Some css/
}

The lazy statement is:
* {Margin: 0; padding: 0 ;}

Body :{

padding: 0;margin: 0;

}

body table tr td{***}

This is not to add a style to the body. This derivative method will eventually add a style to td.
Simply put

body { margin:0;padding:0;}

Https://github.com/necolas/normalize.css

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.