Skip to content

Instantly share code, notes, and snippets.

@jgillman
Created July 9, 2014 22:52
Show Gist options
  • Save jgillman/77e74e0cb366524755d8 to your computer and use it in GitHub Desktop.
Save jgillman/77e74e0cb366524755d8 to your computer and use it in GitHub Desktop.
The difference between max-width 100% and width 100%
/**
* The difference between max-width 100% and width 100%
*/
.maxwidth {
max-width: 100%;
}
.width {
width: 100%;
}
<img class='maxwidth' src='http://placekitten.com/300/300' />
<img class='width' src='http://placekitten.com/300/300' />
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment