I have a game going where i'm doing hitsplats to show up over your picture as you hit your opponent. I"m using the absolute position and this works but I encountered a problem. The problem being that if I resize the window or I am in another resolution, these spots are not how I orginally setup them up. Putting my hit splats in relative mode only moves stuff around. So how can I get my hitsplats in the center like they are now with Absolute, but yet not make them absolutely absolute? So they flow with the document?
#npchitbox {
width: 50px;
height: 50px;
position: absolute;
background-color:blue;
z-index: 11;
top: 100px;
left: 1050px;
text-align: center;
font-weight: bold;
font-size: 50px;
color: red;
}
Here is HTML code
<div id="playerbox">
<div id="hitbox"> </div>