How do you make sure a website is dynamically viewable?

How would I tackle this problem? I created a website consisting of an index page and a couple of subpages, all enhanced by CSS and JavaScript. Although it looks as it should on my computer, on another computer with a smaller resolution and on my phone it does not look as I want it to.

Should I make a couple of @media only screen and (max-width: x) CSS rules for each popular resolution or is there another way to make sure that my website looks as it should no matter the device / resolution?