user2214952
user2214952

Reputation: 1

CSS | Two Background

I have wordpress site, and i want change background, and i need two images to background Example: https://i.sstatic.net/C5yLQ.png
I want it to body, code is now that:

body {
    background: #fff;
    color: #494949;
    font-family: Arial,Trebuchet MS,Helvetica,sans-serif;
    font-size: 12px;
    line-height: 18px;
    background: url(images/bg1.png) top left repeat-x #D3D5D4;
}

What i need add here? i think bg2 need to fit to screen (site)

Upvotes: 0

Views: 58

Answers (3)

Djouuuuh
Djouuuuh

Reputation: 1167

With CSS3 tricks, you can apply multiple background to only one div. See this example :

body{
    background:url(images/img.gif) no-repeat left top, 
    url(images/img.gif) no-repeat right top, 
    url(images/img.gif) no-repeat left bottom, 
    url(images/img.gif) no-repeat right bottom;
}

Careful with browsers compatibility. Hope it helped ;)

Upvotes: 0

nd_macias
nd_macias

Reputation: 812

You can set seperate background to html element and seperate one to body element.

Upvotes: 0

Eli
Eli

Reputation: 14827

Seperate it into two div and apply different background for each div

Upvotes: 1

Related Questions