While working on my project, I encountered an issue with the alignment of two div
boxes inside the container class. Whenever I zoom in or out on the page, the div boxes collide and change position. I have included my HTML and CSS below, but I am struggling to find a solution to keep the div
boxes fixed within the container class during zooming. Any assistance would be greatly appreciated.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type = "text/css">
*{
margin:0;
padding:0;
font-family:Arial, Helvetica, sans-serif;
}
body{
background-color:#e1e3e4;
}
.main{
width:90%;
margin: 0 auto;
}
header{
height:160px;
background-color:#3c948b;
}
.container{
background-color: #f3f3f3;
min-height:500px;
}
.content{
float:left;
position:relative;
top:10px;
left:10px;
border: 2px solid #111;
width:70%;
}
.panel{
position:relative;
float:left;
top:10px;
left:20px;
border: 2px solid #111;
width:330px;
}
</style>
</head>
<body>
<div class="main">
<header>
<h1>My personal blog</h1>
</header>
<div class="container">
<div class="content">
#content
</div>
<div class="panel">
#panel
</div>
</div>
</div>
</body>
</html>