Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a CSS selector that will select elements with overflowing text?

Is it possible to write a css selector that only selects elements where the text-overflow behavior has been invoked?

<div style="width: 200px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis">
I don't want to select this
</div>

<div style="width: 200px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis">
But I do want to select this because it's overflowing
</div>

Fiddle

like image 802
Matt Mills Avatar asked May 31 '13 20:05

Matt Mills


1 Answers

No there's no CSS selector with which you can select elements where overflow occurs.

like image 71
user2019515 Avatar answered Sep 28 '22 08:09

user2019515