Recently I started learning css and while I was learning about float I didn't understand how overflow:hidden; Works with the float I tried to go to w3schools and mdn But I still don't understand how it works
.parent{
    background-color: red;
    padding: 10px;
    overflow: hidden;
}
.parent div{
    background-color: #eee;
    float: left;
}<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="css/float.css">
    <title>Document</title>
</head>
<body>
    <div class="parent">
        <div>product one</div>
        <div>product one</div>
        <div>product one</div>
        <div>product one</div>
    </div>
    <p>this is a paragraph</p>
</body>
</html> 
     
    