CSS to style images

For a moblog project I recently worked with CSS to resize the images automatically. That could be achieved by adding a \”width:80%\” property to the style definition. With images at a low resolution this leads to a ugly looking images when viewed with high resolution screens. So I introduced the \”max-width\” property to specify a maximum width of an image:

.myImg img {
height: 80%;
width: 80%;
min-width: 50px
max-width: 350px;
}

The images resize now directly with the browser window. The browser used was Firefox 0.8. There has been reported a problem with konqueror without the *-with properties, so please let me know, if the min-width property helped to resolve the problem of hidden images.

Leave a Reply