I want to be able to have a button that is positioned relative to an image. I made a jsfiddle for what I am trying to do.
https://jsfiddle.net/a1e1vb1n/
My expectation is that the button would move with the image, but as you can see it does not =(
HTML:
<div id="container">
<div id="parent">
<img src="http://i.imgur.com/wsNrRVQ.jpg" width=200px height=200px>
</div>
<div id="child">
<button>
Click Me
</button>
</div>
CSS:
#container {
position: relative;
}
#parent {
position: absolute;
left: 200px;
}
#child {
position: absolute;
}