That might work, but that will make dependant on javascript being enabled on the client browser.
You can try to use a flow layout, which will make your website look good on almost all resolutions.
ps. there's not only 800x600 or 1024x768 screen resolutions that people might have ;)