Skip to main content
eBay
Write a guide |  

make scaleable image with css and dreamweaver

Do you want your images to scale?

Place them in a div, give the div an id, ... let say something like..."artwork"

remove the width and height attributes altogether from the image tag itself.

In the css, set the img tag selector max-width property value to 100%

like this

img {

max-width: 100%

}

the image will scale up to 100% of the div's  width.

If you set the div width to 100% The div will scale to 100% of the browser's size.

something like this

#artwork{

max-width: 100%

As the browser width shriks so will your div width and so will your images width 

Author information
http://pics.ebaystatic.com/aw/pics/community/myWorld/imgBuddyBig23.gif
Was this guide helpful?

Select template