In the Chrome browser on Nexus 7 and on HTC Android, I see a 1px field between the top and bottom div. On my Nexus 5 and on the desktop, it does not appear. If I use Chrome Dev Tools and turn on emulation mode, I see a white line. I can solve the problem by adding a negative -1px margin and 1px padding to compensate, however, I'm trying to understand why this happens in the first place.
QUESTION: Can someone explain why this happens, that is, what CSS rules are used?
<!DOCTYPE html>
<html>
<head>
<title>Test margins</title>
<style type="text/css">
.top {
background-color: black;
height: 50px;
}
.bottom {
background-color: black;
height: 50px;
}
</style>
</head>
<body>
<div class="top">
</div>
<div class="bottom">
</div>
</body>
</html>

source
share