I’m trying to move my div in exact place (in pixels) I want (coordinates should be relative to parent’s div).
I’ve tried to write this:
<body>
<div id="desk" style="position: absolute; width:400; height:400; background-color:blue;" >
<div id="cell1" style="position: absolute; left: 51px; top: 1px; width: 48px; height: 48px; color:black; background-color:black;" />
<div id="cell2" style="position: absolute; left: 1px; top: 51px; width: 48px; height: 48px; color:black; background-color:black;" />
</div>
</body>
Here are two squares in (51,1) and (1,51) coordinates.
I’ve expected to get this:

but got this:

Why? What I’m doing wrong and how it can be made properly?
P.S. ‘fixed’ instead ‘absolute’ will do the job, but squares are positioned not under parent div and does not respond to scrolling. Is there any way to fix it?
This works for me:
Close
<div>tags. It thinks, that the 2-nd div is the child of the 1-st.Use px in
width:400px; height:400px;