Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to break text inside a parent div with white-space:nowrap in CSS?

Tags:

css

I am struggling to break the text inside a parent div with white-space:nowrap. The property word-wrap:break-word for anchor is not working. I created a JSFiddle.

like image 334
Sachin Avatar asked Oct 18 '22 08:10

Sachin


1 Answers

All you need to do is add a different white-space rule for your div a block.

Example:

#viewed_products div a {
    white-space: normal;
}
like image 99
badandyomega Avatar answered Oct 21 '22 04:10

badandyomega