I am currently working on a code that dynamically receives variables and concatenates them with an underscore:
var text = product + "_" + someOtherInfo;
After combining the variables, I need to display this text inside a div element.
div {
max-width: 200px;
/* ... */
}
An issue arises when the text exceeds the 200px limit. You can view the problem in this example.
The number of lines is not the concern; however, I would like to force a line break at the maximum width.
Is there a way to achieve this? Thank you in advance!