I have two <div> with absolute position . One is displayed and the other is display: none at boot time. When a link to a visible one is clicked, it moves and the other is displayed.
I have a third <div> with a link that I would like to display directly below them. Since theyre and position: absolute , I could not find a way to do this. I have found various solutions, but most of them are workarounds for using an absolute position. Since my <div> should show each other, I, unfortunately, cannot remove the absolute positioning.
So I tried various combinations of position: absolute and position: relative on three <div> s, but so far nothing has worked.
JSFiddle with my problem: https://jsfiddle.net/dagz9tLw/1/
<div> with id linkbar is the one that should be at the bottom.
The remaining two <div> do not have a given height, so margin-top does not work. linkbar should also be just below the <div> , not the bottom of the page.
javascript jquery html css css-position
Vinc
source share