我正在尝试创建一个固定的布局,侧边栏的背景延伸到最右边。我画了一个草图来说明图像:

在任何窗口大小上,我将如何扩展侧边栏背景以延伸到右侧屏幕的末尾?我试过:
#sidebar {
    z-index: 1000;
    overflow: hidden;
    position: absolute;
    width: 100%;
    background: url(../img/sidebar-base.png) no-repeat 0 -8px;
    min-height: 200px;
    &::after {
        content: '';
        z-index: 10;
        display: block;
        height: 100px;
        overflow: hidden;
        width: 100%;
        background: url(../img/sidebar-rx.png) repeat-x 0 -9px;
        position: absolute;
        top: 0;
    }
}
但是滚动会水平出现,如果我应用overflow:hidden在身体上,我将无法滚动到底部。谢谢!
编辑:我确实尝试过用 javascript 找到我的运气,但仍然有一点滚动:
$(function(){
    $sidebar = $('#sidebar');
    $sidebar.css({width: window.innerWidth - ($sidebar.offset().left)})
});