I am new to HTML/CSS, I am trying to achieve a particular scenario:
- A container div (parent) has two child divs, first for label and second for content.
- Parent div (container) width should depend of second child (content) width, i.e. if the second child width increased due to its content, Parent div width should also be increased. (Parent div width = second child width).
- First child is used for label, so it should not exceed Parent div width. If First child is larger than Parent div width, it should show text as ellipsis. Parent div width should not depend on first child width.
I am not sure if it can be achieved using only CSS. Would really appreciate your help with this.
Thanks in advance.