What you are looking for is responsive design, Initially what you can do is use %
in place of px
and use em
where %
is not working.
Essentially you can use front-end design frameworks like bootstrap and foundation to build responsive design easily, however I will not recommend this to you as of now. Form what I have learned never automate your talk unless you are in tight deadline or you are a pro because as a beginner it is better to learn the core stuff the then move to automation to make things fast.
solved Website is untidy when resolution is resize [closed]