I have a svg image on the left and want to align input fields vertically on the right corresponding to areas of the image. eg the mouth input field should be at the same level of it's mouth (see jsfiddle)
https://jsfiddle.net/om0wr6zL/
The problem is the vertical location of the input fields move relative to the image when the window is resized.
How do I make those input fields move in relation to the image?
HTML:
<div id="container">
<div id="penguin">
<img src="http://upload.wikimedia.org/wikipedia/commons/b/b0/NewTux.svg" >
</div>
<div id="mouth" >
Mouth: <input type="text" >
</div>
</div>
CSS:
#container {
width: 100%;
height: auto;
position: ;
top: 0px;
left: 0px;
}
#penguin img {
width: 100%;
height: auto;
position: absolute;
top: 0px;
left: 0px;
z-index: -1;
}