Domanda

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

È stato utile?

Soluzione

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.
}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top