Default

Why is this a standard add-on for twitter bootstrap on the body?

body {
  padding-top: 60px;
  padding-left: 20px;
}

I got the impression that "reset" css-ish files usually delete all additions / fields.

+5
source share
3 answers

Indentation on the body overrides .css files.

As mentioned in odupont: "This is useful if you have navbar-fixed-top at the top of your page"

Indentation sets a 20px vertical gap between the top fixed positional navigation bar and the body of your document. As shown in the above code, padding-top: 60px;

40px , 40px. , 20px nav-bar . , 60px padding-top.

css ​​ , , .css.

.

+1

, navbar navbar-fixed-top , , Bootstrap Doc.

0

If you have a div and want the background of the div to stretch out on the page, consider using negative margins equivalent to filling in the body, and then padding the div:

margin-left:   -20px;
padding-left:   20px;
margin-right:  -20px;
padding-right:  20px;
0
source

All Articles