Reputation: 31
The ultimate goal (for me) is to create a very simple gallery that is almsot exactly like this example:
EXAMPLE: http://www.iheartdropdead.com/spring-summer-lookbook-2011.html
However, this gallery is made using Flash and I want mine to be made out of HTML, CSS & Javascript, for compatability I want to avoid using Flash.
I have no trouble making the gallery itself (the images transitioning in to one another) because I can use something like this:
freelancer-id.com/easy-gallery/2
My main struggle I'm having is filling the page how I want it to. If you look at the example above and resize the window you will see that it does 2 key things.
Now... I have half-accomplished the first objective by utilizing this piece of coding:
imgscale.kjmeath.com/
This works great for scaling down large images to fit the width of a containing Div. However it currently only does it when the page loads and does not change when you resize the window.
I do not know how to:
*Dynamically resize the gallery depending o nthe window size *Vertically/Horizontally center the image within the container div
If anybody has got any advice or could point me towards some tutorial or plugins which may help that would be great.
Upvotes: 3
Views: 3850
Reputation: 231
You could do it with a Media Query. People have started to call this "responsive" design. You would simply have a different CSS sheet for different resolutions. Like this:
<link rel="stylesheet" type="text/css"
media="screen and (max-device-width: 480px)" href="style.css" />
Here's an article that explains it a bit more: http://www.alistapart.com/articles/responsive-web-design/
Upvotes: 3