![]() |
|
CSS to value not icon - Printable Version +- LogicMachine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: OLD visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9) +--- Thread: CSS to value not icon (/showthread.php?tid=5255) |
CSS to value not icon - savaskorkmaz - 20.02.2024 Hi, I am using an icon with value (Custom values ) in visulation. I need to limit text length with CSS. But CSS code is affecting also icon itself. How can i cange only value not icon with CSS and Additional Classes. Regards, RE: CSS to value not icon - admin - 20.02.2024 Add to Custom JavaScript: Code: $(function(){
$('.limit-text').each(function(index, el) {
var width = $(el).find('img').css('width')
if (width) {
$(el).find('.value')
.css('width', width)
.css('overflow', 'hidden')
.css('text-overflow', 'ellipsis')
}
});
});Then set "Additional classes" to limit-text for each element where text width must be limited to the icon width. |