Skip to content

Instantly share code, notes, and snippets.

@peterwilsoncc
Created April 7, 2014 02:53
Show Gist options
  • Select an option

  • Save peterwilsoncc/10014199 to your computer and use it in GitHub Desktop.

Select an option

Save peterwilsoncc/10014199 to your computer and use it in GitHub Desktop.
width and height priority
.set-width {
min-width: 50px; /* overrides */
max-width: 25px; /* which in turn, overrides */
width: 30px;
}
.set-height {
min-height: 50px; /* overrides */
max-height: 25px; /* which in turn, overrides */
height: 30px;
}
<div class="set-width set-height">
<p>This would be 50 by 50 pixels</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment