我正在使用 Jekyll 主题创建网站。在我网站的某些页面上,页脚被切成两半或不是整个页面宽度。
我使用的 Jekyll 主题是 feeling responsive。您可以在 here 找到页脚不是整个页面宽度的页面示例。我认为问题出在
_grid.scss
,尤其是在_grid.scss
的else规则部分,我在下面附上了一个片段。何
存储库可以在这里找到,各个组件是:
最终我希望每页的页脚都是页面的整个宽度。
@mixin grid-row($behavior: false) {
// use @include grid-row(nest); to include a nested row
@if $behavior == nest {
width: auto;
margin-#{$default-float}: -($column-gutter/2);
margin-#{$opposite-direction}: -($column-gutter/2);
margin-top: 0;
margin-bottom: 0;
max-width: none;
}
// use @include grid-row(collapse); to collapsed a container row margins
@else if $behavior == collapse {
width: 100%;
margin: 0;
max-width: $row-width;
}
// use @include grid-row(nest-collapse); to collapse outer margins on a nested row
@else if $behavior == nest-collapse {
width: auto;
margin: 0;
max-width: none;
}
// use @include grid-row; to use a container row
@else {
width: 100%;
margin-#{$default-float}: auto;
margin-#{$opposite-direction}: auto;
margin-top: 0;
margin-bottom: 0;
max-width: $row-width;
}
// Clearfix for all rows
@include clearfix();
}