Search code examples
htmlcssdreamweaver

Putting a table ontop of an image using css, html and dreamweaver


I am just starting out making my first website. What I am trying to do is put a chart over top of a picture. I have a tiled background image, and then I have another large image onto of the background. I want a chart to be put on top of the large image. In my CSS panel I have set the placement to where I want the chart to be (on top of the image), but when I change the position to "absolute" the chart just disappears. I think it might be behind my other picture? When I change the position to "relative" it goes where I want it to be, but of course I don't want it relative (moving with the window) I want it to be in the same place when the window changes.

I'm hoping there is a quick fix for this that I'm not aware of.


Solution

  • For absolute to work the element must be inside an element with its position set to relative, fixed, or absolute.

    <div id="outer" style="position:relative">
        <div id="inner" style="position:absolute;top:100px;left:100px">
            blah
        </div>
    </div>
    

    edited to remove link. Just google "position absolute values"