1

I don't how to do background which extend and will be centered

now I have something like this:

body {
    background: url(tlo.jpg) no-repeat;
    background-attachment: fixed;
    background-position: center;
}

It is centered and it have constant size....

I want that it will be just proportionally expanded......

I need to keep the proportions

thanks!

OK i have solution! :)

body {
    background-image: url(tlo.jpg);
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position: center center;
}
AlliterativeAlice
  • 11,841
  • 9
  • 52
  • 69
Adacho
  • 99
  • 4
  • 13
  • no no, i want to keep the proportions!! all this question is how to to stretch or scale... i want it but i want too keep the proportions – Adacho Aug 15 '13 at 10:54

2 Answers2

0

Try this

 body {
        background: url(tlo.jpg) no-repeat center center fixed;
        -webkit-background-size: cover;
        -moz-background-size: cover;
        -o-background-size: cover;
         background-size: cover;
    }
koningdavid
  • 7,903
  • 7
  • 35
  • 46
0

i think background-size: may help you..

 body {
        background: url(tlo.jpg) no-repeat;
        background-position: center;
        background-size: 100% 100%;
 }

it will take 100% width of body's total width and 100% height of body's total height...

RbG
  • 3,181
  • 3
  • 32
  • 43