Full width header in jekyll?

白昼怎懂夜的黑 提交于 2020-01-05 04:56:10

问题


In my Jekyll site all content has specific width. As I understand this comes from /css/main.scss :

$content-width:    800px;
$on-palm:          600px;
$on-laptop:        800px;

I tried using "local" css in order to overwrite these. And it didn't worked.

Also the above affects the whole content.

Is there any way to make the header (/_includes/header.html) full width and keep the rest content with the default-centered width (inherited from above)?


回答1:


In _includes/header.html, change <div class="wrapper"> for <div class="wrapper-header">.

In _sass/base.scss add :

.wrapper-header {
    padding-right: $spacing-unit;
    padding-left: $spacing-unit;
    @extend %clearfix;

    @include media-query($on-laptop) {
        padding-right: $spacing-unit / 2;
        padding-left: $spacing-unit / 2;
    }
}


来源:https://stackoverflow.com/questions/38705593/full-width-header-in-jekyll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!