.line
{
position:absolute;
z-index:2
top: 50px;
}
.otherclass
{
position:absolute;
z-index:1;
}
<div class="line">---</div>
<div class="otherclass"> my content </div>
Why top
attribute not work? Is any alternative to z-index? (my pdf generator library probably does not support z-index
tag)
EDIT:
I'm trying to generate PDF from HTML:
top
from 70 line not work. How can I fix it?
There were older ways of doing this on the old Netscape but they are mostly gone now. I think z-index is it. Don't know what you are working on but I would keep in mind that html is not a page formatting language like pdf is. That is why we have both. html was designed to hint at what the browser should do. So can you turn the z-index blocks into divs and have them flow above, below or to the side of the other content?