Grow your CSS skills. Land your dream job.

Scaling div to image automaticly.

  • red
    # November 5, 2008 at 5:26 am

    So I’ve created a small image gallery using jquery, it works splendid but I’d like the div in which the image opens up to scale accordingly without having to set up custom width to each div. The height works automatically and is correct with all padding and margins, but.. Just check it out and you get what I mean:

    http://koti.tamk.fi/~c7rnyber/homework/ … leria.html
    http://koti.tamk.fi/~c7rnyber/homework/ … lleria.css

    I’ve tried googling, but might be that I can’t come up with the correct searchword. :l

    # November 5, 2008 at 2:38 pm

    the fastest solution is to use the lightbox effect. just google lightbox. You can then edit the lightbox css to change the background, to add an image to it or change the color. use your imagination.

    check here

    http://www.huddletogether.com/projects/lightbox2/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".