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;
}
Code Example |
---|
Css :: vh and vw |
Css :: CSS technique for a horizontal line with icons in the middle |
Css :: css media queries laptop |
Css :: ion-split-pane width |
Css :: onclick after color change in css |
Css :: how to increase font height css |
Css :: css table size |
Css :: css nth-child |
Css :: how to add color in css |
Css :: create arrow div css |
Css :: css absolute position inside div |
Css :: responsive width css |
Css :: how to stop overflow in css |
Css :: background blur css |
Css :: conic gradient in css |
Css :: border shorthand css |
Css :: css make text closer together |
Css :: scss maps´ |
Css :: border-width |
Css :: css affect other elements on hover |
Css :: margin bottom |
Css :: how to specify number of characters in css |
Css :: css make ul on multiple lines |
Css :: how to ignore an element from the flexbox container |
Css :: css 4 modal |
Css :: blur background image css |
Css :: css line-height |
Css :: nav bar without display:flex |
Css :: difference between html and css |
Css :: add background in text |