http://stackoverflow.com/questions/10487292/position-absolute-but-relative-to-parent
Hey, so, please check link above. There is first resolving answer, which was resolving my problem. But now I have problem, that DIV isn't displaying well when it is set to position: relative
and position: fixed
does work correctly. DIV itself has no children, first I am trying to get parent there, I will care about children later.
#div {
position: relative;
left: 0;
top: 0;
width: 15%;
height: 100%;
background-color: rgba(0, 0, 0, 1);
}
There appeears black line in top left, it is 15% width and hmmm, 0,8% high? It looks like it has no height set, but it does.
If I change position: relative
to position: fixed
(what is actually what I need) it works.