Body width on resize

Body width on resize

Hi there

I'm having a problem where two elements that are both centred appear to be out of alignment by one pixel when resizing - I'm sure this is due to the fact that if the browser is an odd number of pixels, then one or more elements positioned by % or em are actually on half or sub-pixels.

My question is, would jquery be a good solution? I can't even imagine how to begin writing the code, wondering if someone else has come across this?

I'm thinking along the lines of "check on load or resize if browser size is an odd or even number, then set body or my wrapper div to be 1 pixel less than current".

Any thoughts, anyone?

Thanks!