If we have something in a div
block , how come it can flow out of the div
block as if nothing's even there ?
For example , here :
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="box.css"/>
<title>Result</title>
</head>
<body>
<div>
<p>one</p>
<p>two</p>
<p>one</p>
<p>two</p>
<p>one</p>
<p>two</p>
</div>
</body>
</html>
the <p>
stuff flows out of the <div>
so easily. Why is that ?
stylesheet:
* {
border: 1px dashed black;
}
div {
height: 50px;
width: 100px;
border: 4px solid #FF0000;
border-radius: 5px;
background-color: #308014;
margin:10px 10px 10px 10px;
padding:40px;
}
div p{
background-color:yellow;
/*display:inline;*/
}