I want to create a webpage where a background image is there and on that, there’s a place holder for an image, where a user can click and upload a photo and that photo will be placed on that background image(with the user uploaded image can be resize of zoom in).
So my question is:
-
How do I create a blank space say a circle on top of an background image, I have created background image on page using this:
<div style="background-image: url(bg.jpg); height: 400px; width: 800px; border: 1px solid black;"> -
I want in that space created above to have a link sort of which will open a pop up to let user upload an image and that image will be visible in the space created(circle).
I know how to open modal form using jquery, and upload image using php.
Please guide me in creating the place holder for image and in turn how can i place that image in the place holder after upload.
I am not good at jquery and HTML. So appreciate your help int his regard.
CSS:
HTML:
jQuery
At first there will be an empty
<img />tag. With jQuery, after the upload, you can set the value this way:Screenshot:
Fiddle: http://jsfiddle.net/UUtyQ/