Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
<!-- Margin collapsing example -->
<div class="container">
  <p class="upper">Upper element</p>
  <p class="lower">Lower element</p>
</div>
</body>
</html>
 
.upper {
  /* Larger margin remains */
  margin-block-end: 50px;
}
.lower {
  /* Smaller margin disappears */
  margin-block-start: 10px;
}
.container {
  border: 1px solid purple;
  /* Margins don't collapse in the flex layout or grid layout */
  /* display: grid; */
}
p {
  border: 1px solid green;
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers