Html fit to screen

Hey guys super new to HTML and still very noob. I created a site in html and just got it the way I liked it uploaded it and when i opened the site on laptop it moved my texed ext. Is there a java scrypt or something I can use to auto shrink page acording to screen size without moving any of the elements. I have donr so SHAREitme googling, some say to use stuff like max width=700px for example. problem is most of my text and div tags have custom margins to position it where I want i Appvnt. The images I have autosize fine but things like my (ul) that is alignd vertically will move from using one line to using two lines. If someone does have a fix please explain it in lamens terms remember noob here, but eager to learn from my mistakes. Thanks

Do you have a link to your code? What you can do is use @media query on CSS. So,

@media screen and (max-width: 700px) {
/* css here */

So you can specify each css for different viewport width.

1 Like