Please see my html
<div class="parent-canvas">
<div class="text-canvas" contenteditable="true">
my text
</div>
<div class="image">
<div class="image-canvas">
<div class="imageupload" onclick="submit_button()"><img src="Image.jpeg"></div>
</div>
</div>
</div>
Here when user click on imageupload div then submit_button function works .It is function written in javascript .
Here what i want is i need to make my text showing infront of the image . It’s like layer concept in photoshop . I need to make the background layer is parent-canvas
first layer is image-canvas , and the front layer is text-canvas .How to do this .? Currently what happen is my text is not showing and it is under image.jpeg.
Also i need to make my-text editable. Anywhere in the image click then submit_button function work . But when we move to my text to front may be in the center portion , on that text portion i can edit the text ,
and the remain portion submit_button() function need to work .
3
Answers
Try This.
DEMO:
http://plnkr.co/edit/YmlDaDluwALneBjyQjQE?p=preview
html:
CSS:
Use CSS z-index, here is an example of using z-index