Skip to content

Instantly share code, notes, and snippets.

@tristen
Created December 16, 2016 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tristen/40b57811e2804db051068d00224eaaff to your computer and use it in GitHub Desktop.
Save tristen/40b57811e2804db051068d00224eaaff to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<style>
body {
font: 16px sans-serif;
margin: 0;
padding: 0;
}
.parent {
display: inline-flex;
flex-direction: row;
}
.parent > div {
background-color: red;
color: white;
padding: 0 10px;
}
.parent > .active { background-color: green; }
</style>
</head>
<body>
<div class='parent'>
<div>a</div>
<div class='active'>horse</div>
<div>pig</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment