Jon2713 Jon2713 - 1 month ago 6
CSS Question

How to keep css content position when zooming in and out?

Every time i zoom in and out my content just moves around and it bugs me because its sloppy work. How do it keep it in place while i zoom in and out? I've been searching but can't find a solution to this problem.

<head>
<style type="text/css">
#top-container{
width: 100%;
height: 105px;
margin: 0 auto;


}
body{
padding: 0;
margin: 0;
}
#luxlogo{
width: 300px;
height: 105px;
margin-left: 700px;
}


</style>
<body>
<div id="top-container">
<img id="luxlogo" src="luxpics/luxlogo.png">


</div>

Answer

Poster said this worked for the comment section so I am adding as an answer.

For that you can use position: absolute and give it a top and left position or use background-position: cover or contain.