Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

width fit content

.container {
  border: 2px solid #ccc;
  padding: 10px;
  width: 20em;
}

.item {
  width: -moz-max-content;
  width: max-content;
  background-color: #8ca0ff;
  padding: 5px;
  margin-bottom: 1em;
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #width #fit #content
ADD COMMENT
Topic
Name
4+3 =