CODEPEN link: http://codepen.io/ariaspark/pen/kXdVbL
I created an absolute-positioned element that is relating to the html element when I set its top and right position. Its ancestor (relative-positioned) element just seems to not exist. I am sure I am missing something simple but honestly have no idea what it is.
I need the blue div element (absolute positioned) placed exactly top: 0; right: 0; over the maroon area of the Fish box (relative-positioned). The Codepen link to visualize what I say its above the post. Any help?
By the way, this is an image
By the way, this is an image of the result I need!
You have three separate elements with id=box. This is a serious syntax error.
The issue is that the absolute box is not descended from 'box'. You closed the 'box' box before coding the the absolute box.
It should be more like this:
<div id="fishbox"> <hx>Fish</hx> <!-- appropriate heading level --> <div id="absolute-box"> <p>blah, blah, blah</p> </div> </div>