I set width as max-content and it worked for me.
width: max-content;
More Related Contents:
- What are the differences between flex-basis and width?
- Canvas is stretched when using CSS but normal with “width” / “height” properties
- CSS – why doesn’t percentage height work? [duplicate]
- CSS \9 in width property
- Does height and width not apply to span?
- IE 8: background-size fix [duplicate]
- How to set up fixed width for ?
- CSS Input with width: 100% goes outside parent’s bound
- CSS: 100% width or height while keeping aspect ratio?
- Bootstrap Element 100% Width
- What’s the maximum pixel value of CSS width and height properties?
- What is the meaning of \9 in this width property value declaration? [duplicate]
- CSS width 100% OR max-width in pixels
- Canvas is stretched when using CSS but normal with `width` & `height` attributes
- 100% DIV width is not really 100%
- How to remove the border highlight on an input text element
- Can I set background image and opacity in the same property?
- CSS3’s attr() doesn’t work in major browsers
- relative path to CSS file [closed]
- CSS background-size: cover + background-attachment: fixed clipping background images
- What does a star-preceded property mean in CSS?
- CSS text-transform capitalize on all caps
- import .css file into .less file
- Border within border CSS
- Newline character sequence in CSS ‘content’ property? [duplicate]
- What are the rules around whitespace in attribute selectors?
- Is vertical text-overflow possible with css3?
- Why shouldn’t I use position:absolute for positioning everything?
- Bootstrap Grid System new line does not look nice
- Issues with “background-position” in “background” shorthand property