There's no way to get a background image to stretch using CSS. Have you considered just defining a gradient? For example:
background: #1e5799; /* Old browsers */ background: -moz-linear-gradient(top, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#1e5799), color-stop(50%,#2989d8), color-stop(51%,#207cca), color-stop(100%,#7db9e8)); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* Opera11.10+ */ background: -ms-linear-gradient(top, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* IE10+ */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e5799', endColorstr='#7db9e8',GradientType=0 ); /* IE6-9 */ background: linear-gradient(top, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* W3C */ There are lots of tools to help you generate this. I used the Colorzilla gradient generator <http://www.colorzilla.com/gradient-editor/> for the example above. On Wed, Jun 29, 2011 at 3:01 AM, Vishnu vg <[email protected]> wrote: > HI Friends > > I have a css doubt related to background image in body > > I have a bakcground image. The image has two shades (one in left and right > a gradient design) . Exactly two halves. First half is black and second half > is a gradient design. I want that background image to be fluid width in all > browsers and in all resolutoin. I mean if i view that image in 1024 or 1600 > resolution the background image should fill. Currently when i gave a 1024 > resolution image as background , in higher resolutions the image is not > getting filled up to the screen; > > -- > With Love, > Vishnu, > Mobile : 9544455735 > > -- > -- > You received this because you are subscribed to the "Design the Web with > CSS" at Google groups. > To post: [email protected] > To unsubscribe: [email protected] -- -- You received this because you are subscribed to the "Design the Web with CSS" at Google groups. To post: [email protected] To unsubscribe: [email protected]
