문제

First question posed, so apologies if it is not worded correctly or vague.
My question is this: Can a fullwidth div be put in the background of a wrapper? Here is what I'm trying to achieve: (Not enough reputation to upload image?)

Basically, I would like a full-width gradiented banner behind the main content / wrapper. There is however, also a repeating background pattern too.

Like on the Rosetta Stone Example: http://www.rosettastone.co.uk/lp/branduk/?gclid=CNTzoOPihrcCFSXLtAodMyMAEg&rd=0&cid=se-gguk113f2&s_tnt=59574:1:0 the banner image overlaps the background yellow.

Can this be achieved with the way I'm going about it? I'm using Dreamweaver CS6 and my CSS skills are basic.

Thanks in advance for any help.

Cheers

도움이 되었습니까?

해결책

You should get started by adding:

<div class="banner"></div>
<div>
    //Content with wrapper
</div>

CSS:

.banner{
    position: absolute;
    top: 0;
    z-index: -1;
    with: 100%;
    height: 100px;
    background-image: 'your-image';
    background-repeat:repeat-x; //Whatever condition you need.
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top