I want to create two side-by-side DIVs, with the left one always containing text and the right one possibly being empty.
If the right DIV contains text ... the width of the left DIV should adjust to match the text width, but only up to 50% of the parent DIV's width.
If the right DIV is empty ... the width of the left DIV should adjust to match the text width, up to 100% of the parent DIV's width.
In both cases, if there is too much text to fit on one line, it should wrap onto the next line.
Is it achievable using CSS alone? Or will I need a JavaScript solution?
Appreciate any help!