White line between divs appearing when I view the site on mobile and on Chrome dev tools (mobile mode).
faint white line between the left and right div
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
border: 0;
}
body {
display: flex;
width: 100dvw;
height: 100dvh;
margin: 0;
background-color: white;
}
body div {
background-color: black;
}
body > div {
display: flex;
flex-direction: column;
flex: 1;
margin: 0;
}
body > div > div {
flex: 1;
}
</style>
</head>
<body>
<div>
<div></div>
<div></div>
</div>
<div>
<div></div>
<div></div>
</div>
</body>
</html>
I’ve tried setting margin,padding,border to none. It didn’t work.
New contributor
addinør is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.