I have a problem when scaling the site. The site is shifted to the left corner and I would like to stay in the center. How to do it? Here is the code of my page:
* { margin: 0; padding: 0; } @media (max-width: 990px) { img {max-width: 100%; height: auto;} } @media (max-width: 900px) { img {max-width: 100%; height: auto;} } @media (max-width: 820px) { img {max-width: 100%; height: auto;} } @media (max-width: 680px) { img {max-width: 100%; height: auto;} } @media (max-width: 506px) { img {max-width: 100%; height: auto;} } @media (max-width: 650px) { img {max-width: 100%; height: auto;} } html { width: 100%; } body { background: #000; max-width: 1262; padding: 0; margin: 0px auto; } header { text-align: center; padding: 0; margin: 0; } .leftimg { margin-top: -325px; margin-left: -97px; } .rightimg { margin-top: -1192px; margin-left: 1047px; } .baza-01 { margin-left: 15px; padding: 0; margin-top: -830px; } .baza-02 { margin-left: 217px; padding: 0; margin-top: -204px; } .baza-03 { margin-left: 419px; padding: 0; margin-top: -204px; } .baza-04 { margin-left: 621px; padding: 0; margin-top: -204px; } .baza-05 { margin-left: 823px; margin-top: -204px; padding: 0; } /*content*/ img.animate3 { filter: alpha(Opacity=25); /* แแแแญแแ แแแแแแ IE-แกแแแแแก */ opacity: 0.25; /* แแแฎแแแ แแแแแแญแแ แแแแแแ แกแฎแแ แแแแแแฎแแแแแแแแแกแแแแแก */ -moz-transition: all 1s ease-in-out; /* แแแแแกแแแแก แแคแแฅแขแ Firefox-แแกแแแแแก แแแ แกแแแแแ 16.0 */ -webkit-transition: all 1s ease-in-out; /* แแแแแกแแแแก แแคแแฅแขแ Chrome แแแ แกแแแแแ 26.0, Safari, Android แแ iOS */ -o-transition: all 1s ease-in-out; /* แแแแแกแแแแก แแคแแฅแขแ Opera-แกแแแแก แแแ แกแแแแแ 12.10 */ transition: all 1s ease-in-out; /* แแแแแกแแแแก แแคแแฅแขแ แกแฎแแ แแแแแแฎแแแแแแแแแกแแแแแก */ } img.animate3:hover { filter: alpha(Opacity=100); /* แแแแญแแ แแแแแแ IE-แกแแแแก */ opacity: 1; /* แแแแญแแ แแแแแแ แกแฎแแ แแแแแแฎแแแแแแแแแกแแแแก */ } .content { width: 1100px; max-width: 1045px; min-width: 1045px; margin-left: 110px; position: absolute; }
body
tag is better not to hang anything related to the size of the window, it is better to create a separate class inside it to work with it and set the desired dimensions. @media for the same tag, and the properties of which do not change, it is better to put in a separate class, or to do globally - Vasily Barbashev