CSS Nested Divs Debug Style


The following styles will make nested divs, up to 6 levels with a diferent shade of black. To easily visualize the depth. This is for testing while designing.

div {
  border: 1px solid #000;
  margin: 2px;
  padding: 2px; }
  div > div {
    border-color: #333; }
    div > div > div {
      border-color: #666; }
      div > div > div > div {
        border-color: #999; }
        div > div > div > div > div {
          border-color: #CCC; }
          div > div > div > div > div > div {
            border-color: #e1e1e1; }
            div > div > div > div > div > div > div {
              border-color: #eaeaea; }
Advertisements