-2

I want to automatically resize the header using css but without using repeat-x - because the header contains picture and I don't want it to repeat when a user resizes the page (CTRL with +scroll ).

I tried width: 100%; but it did not work

Vitalii Zurian
  • 17,256
  • 4
  • 62
  • 80
Heq Dz
  • 3
  • 1
  • 4

2 Answers2

0

Use the background-size style:

header {
    background-size: 100%;
}

JSFiddle

George
  • 34,712
  • 7
  • 55
  • 91
0

Try to use background-size: cover

edonbajrami
  • 2,106
  • 22
  • 34