Making site change size for different size monitors?

I know this has probably been asked 1000 times but I cannot find the answer.

I want to make the website adjust so it looks good in a 17" and a 22" monitor. Is there some kind of CSS code I can put it that I can accomplish this?

Again sorry for the newb question but I am having a brain fart today.

Your only real option here is to use a liquid (fluid) or elastic layout that adjusts to the size of the “canvas.” There are scripts out there which allow for multiple stylesheets, so you could create multiple sizes for your site and allow the user to switch back and forth, but the liquid/elastic layout is far more sensible IMO.

One option is to use media queries, so that you create maybe 4 or 5 different versions of the layout, and then the browser will pick the appropriate one based on window size.

So how would you handle a 22" monitor with a screen width of 1200px and another one with a screen width of 1400px, and another one with a width of 1900px?

Next, what if one user of a 22" monitor has two browsers open side by side, comparing two online shops perhaps?

Basically, design a site to look good on an average size (in pixels) monitor, and remember that trying to read 15 - 20" long lines of text and then find the beginning of the next line of text is tricky.