# \[CSS\]background image wont resize according to screensize

**URL:** <https://forum.kirupa.com/t/css-background-image-wont-resize-according-to-screensize/208168>\
**Category:** web dev\
**Created:** [November 25, 2006, 9:50pm UTC](https://forum.kirupa.com/t/css-background-image-wont-resize-according-to-screensize/208168 "2006-11-25T21:50:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Binji](https://avatars.discourse-cdn.com/v4/letter/b/cdc98d/32.png) [@Binji](https://forum.kirupa.com/u/Binji)\
**Post date:** [November 25, 2006, 9:50pm UTC](https://forum.kirupa.com/t/css-background-image-wont-resize-according-to-screensize/208168/1 "2006-11-25T21:50:53Z")

</div>

Im trying to create a page with a background image about 30px wide and 1200px high (its a linear gradient image) which im tiling on x axis. The problem is that the image wont scale…it always remains the same size no matter how big the browser window is. I tried with this CSS code:

```auto

body{
    background-image:url(ozadje.png);
    background-attachment: fixed;
    background-repeat: repeat-x;
    height: auto !important;
    height:100%;
    position: fixed;
}

```

Thanks very much!
