I have a image who’s width and height i got in Javascript. i want to set the background image on image.
means to the background image is look like image as youtube show the image on video called play icon.
i want to show them on image. can someone tell me how i can set playicon over the image.
I didn’t understand exactly your question. I suppose you want to place
imgover abackground-imageif yes check the following example:html
css
Demo: http://jsfiddle.net/ACazB/
divhasposition:relativeandimgs insidedivhaveposition:absolute. This will allow you to manipulate the position of any images in the scope ofdiv. Using box offsetstop,bottom,left,rightyou can move the images in the place you need.http://css-tricks.com/791-absolute-positioning-inside-relative-positioning/
http://www.w3.org/TR/CSS2/visuren.html#position-props