It is probably best to cut the image server side independently. For some, this is the only way to reduce load time, and it bypassed any browser compatibility or disabled JavaScript problems. In addition, it is relatively easy, especially if you can use Imagemagick, and if you need to resize the image, the quality will be better and consistent.
But as for your questions, yes and yes.
You really don't need JavaScript at all, CSS should do the job (although I assume this would be true for almost all page layouts). The key is not to use the <img> element, but to resize, which also scales and distorts the image attached to it. Use any common element, even <a> , if you want the image to be clickable:
a#image { display: block; background-image: url(someimage.png); background-position: 100px 250px; width: 500px; height: 700px; }
Pretty simple stuff, shouldn't have a big problem with browser compatibility (although don't quote me on that).
If you want the image area to be selected, you can place the <span> element inside the image containing the element and style that he likes:
a#image span { position: absolute; top: 30px; left: 50px; width: 10px; height: 10px; background-color: orange; opacity: .7; display: block; } a#image { position: relative; }
All this from the head, so you may have to experiment, but there is an idea.
If you don’t need to resize the image or save bandwidth, and you expect users to often see a full-sized image, setting these styles using JavaScript can be useful. However, in most cases, server-side image processing is the way to go.