Sachin
Sachin

Reputation: 1698

How to break text inside a parent div with white-space:nowrap in 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.

Upvotes: 5

Views: 2004

Answers (1)

badandyomega
badandyomega

Reputation: 252

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;
}

Upvotes: 3

Related Questions