hi i wonder how to show only a part of an image, without editing the image, for example: i have a smiley image (?)and i want to show only a half of the smiley. thx!
@CentauriDec 11.2007 — #Set the image as a background to some element ( a div if no other element is available) and set its size to be smaller than the graphic.
@WebJoelDec 12.2007 — #If the image is background-image in a container, you could position the image "background-position:X% Y%;" (here whereby "X" = left and "Y" = top, so, "50% 0" would be the values to state) and maybe set "overflow:hidden;" to the container if the image protrudes. It shouldn't though, being 'background'...
Or are you asking about the "clip" property? (example: [B]#thisDiv[/B][B]{clip: rect(0, 0, 0, 50%);}[/B] )? Haven't used this in years, but it 'clips' an image without having to edit said image.