Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Senior Coder
    Join Date
    Apr 2005
    Posts
    1,051
    Thanks
    0
    Thanked 0 Times in 0 Posts

    div background image stretch to fit div

    I have a div tag that holds images (for a image gallery)

    After the 'next' button is selected the background image of the div tag is changed to the previous image and a new image is 'faded' overtop of it (give a nice fade effect)

    the only problem is, when i set the new background image is does not 'fill' the div tag. instead it is scalled to fit (height, or width depending on the image dimensions)

    does anyone know how to set a background image for a div tag and make it stretch to fit?
    public string ConjunctionJunction(string words, string phrases, string clauses)
    {
    return (String)(words + phrases + clauses);
    }
    <--- Was I Helpfull? Let me know ---<

  • #2
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can't stretch a background image unfortunately, the only way would be to have a tiling image and repeat it using the 'repeat' property.

  • #3
    Senior Coder
    Join Date
    Apr 2005
    Posts
    1,051
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Found a solution, just layer an image behind it and update that image :P

    an example of what i'm doing can be found here (temporary link, will be taken down eventually)

    http://rlemon.com/adam_portfolio/gal.htm

    take into consideration i just started this gallery. it's nothing specail right now.
    public string ConjunctionJunction(string words, string phrases, string clauses)
    {
    return (String)(words + phrases + clauses);
    }
    <--- Was I Helpfull? Let me know ---<


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •