调整页脚图像使其偏移10像素?

Den*_*ian 5 html css css3

我的网页有一个静态的页眉和页脚,对于我的顶级徽标/图像,图像悬垂了10像素,这是我想要它做的,但我的底部图像悬在屏幕的末端,我希望它是一个负偏移所以图像的顶部比页脚高10个像素...

如果你检查图像 你可以看到它目前的样子(绿色=正确,红色=不正确)

如果你检查图像 您可以看到这是它应该是什么样子,图像悬在两个静态条上.

的jsfiddle

我一直在努力尝试它的工作的部分css是:

#footer_container {
    background: #262A2D url('gradhead.png') repeat-x;
    border: 0px solid #666;
    bottom: 0;
    height: 80px;
    left: 0;
    position: fixed;
    width: 100%;
}

#footer {
    position: relative;
    margin: 0 auto;
    height: 100%;
    width: 100%;
    text-align: center;
    color: #ECECEC;
}

#footer .footimage {
}
Run Code Online (Sandbox Code Playgroud)

如果我在一个扔top: -10px;#footerCSS一切偏移这是不太我正在寻找它修复了主图像,但一切了移动...

Squ*_*Cat 4

将其添加到您的 CSS 声明中:

#footer .footimage {
    position: relative;
    top: -10px;
}
Run Code Online (Sandbox Code Playgroud)

参见jsFiddle