Skip to content

Instantly share code, notes, and snippets.

@rkellermeyer
Created August 4, 2012 20:59
Show Gist options
  • Save rkellermeyer/3259906 to your computer and use it in GitHub Desktop.
Save rkellermeyer/3259906 to your computer and use it in GitHub Desktop.
Give nested div same color as background
<!DOCTYPE HTML>
<html lang="ru-RU">
<head>
<meta charset="UTF-8">
<title></title>
<style>
body, .nested {
background: blue;
}
.container, .nested {
margin: 10px;
}
.container {
background: red;
}
</style>
</head>
<body>
<div class="container">
Container Class
<div class="nested">Nested Div</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment