Good evening,
you should wrap your code into a code box (even better with css syntax highlighting). ;)
To transform your absolute values into percentage ones, we would have to know the surrounding code/layout/sizes. E.g.: The child is as big, as the parent when setting width/height to 100%.
So way more information needed on this one, or am I getting you totally wrong here?
Best regards