How to stretch the background image to fill

Discussion in 'ASP .Net' started by AAaron123, Nov 2, 2008.

  1. AAaron123

    AAaron123 Guest

    I have a pretty simple background image. Just a gradient using two colors.

    I like to uses a small image and have the browser stretch it.

    Is that possible. I did find the "repeat" but can not find a "stretch"

    Is there one?


    Thanks
     
    AAaron123, Nov 2, 2008
    #1
    1. Advertisements

  2. CSS does not specify any measures to control the size/strething of
    background images. However, you are able to stretch regular images (img
    elements), and by playing with the display and z-index attributes you are
    able to "fake" a stretched background image.

    Example code: http://gist.github.com/21707
     
    Joern Schou-Rode, Nov 2, 2008
    #2
    1. Advertisements

  3. AAaron123

    AAaron123 Guest

    That works


    thanks

     
    AAaron123, Nov 3, 2008
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.