html - Position body background starting at container end -


i have container 980 pixels wide. want background of main page (the body) start right of container , continue far right browser window goes, or until image ends (whichever sooner).

it position background image this:

body    {     margin: 0;     font-size: 10pt;     line-height: 1.4em;     text-align: center;     background: url(images/image.jpg) no-repeat 980px top; } 

then background image start 980 pixels left hand edge of browser window means work on 1 particular screen resolution.

i tired positioning element background went off edge of screen , when tried hide overflow, meant couldn't scroll main page see content on low resolution or high zoom.

is there way take centre , add 490 pixels start end of container? i'd prefer able (x)html , css wihout having resort of javascript.

one of many ways solve create div task hold background. can place div want using position: absolute;

fiddle


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -