0

I have tried using text-overflow: ellipsis; this syntax but it's not working can any one help me

Html

 <div class="product-desc"> <p>How to show dots if text is exceeds than the limit</p> </div> 

Style that i have used

.product-desc{ padding: 0.8em 1.5em; background: #337AB7; text-align: center; text-overflow: ellipsis; } .product-desc p{ font-size: 1.2em; color: #fff; margin-bottom: 0.5em; font-family: 'Carrois Gothic', sans-serif; } 
0

1 Answer 1

1

Try the below:

.product-desc p{ font-size: 1.2em; color: #fff; margin-bottom: 0.5em; font-family: 'Carrois Gothic', sans-serif; width:180px; white-space: nowrap; overflow:hidden !important; text-overflow: ellipsis; } 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.