-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,858
  • 4
  • 64
  • 81
Heq Dz
  • 3
  • 1
  • 4

2 Answers2

0

Use the background-size style:

header {
    background-size: 100%;
}

JSFiddle

George
  • 36,413
  • 9
  • 66
  • 103
0

Try to use background-size: cover

edonbajrami
  • 2,196
  • 24
  • 34