html - How do I keep my wrapper remain centered when zooming in and out? -
the problem layout not break on zoom out or in, wraps left, @ smallest zoom see layout in leftmost part of browser screen. while want layout decrease in size not float left. want remain centered time every single zoom.
how do that?
<body class="body"> <div class="wrapper">/</div> <script src="js/jquery.js" type="text/javascript"></script> </body>
.body { position: absolue; top: 0%; margin: 0 auto; width: 1366px; height: 768px; background: white; } .wrapper { position: absolute; left: 20%; right: 20%; margin: 0 auto; min-height: 100%; background: black; }
on body tag, put text-align: center;
should keep centered when zooming.
Comments
Post a Comment