06.06.2023, 08:40
Have a simple transparent square icon with a solid blue boarder, but rather than the object value being underneath icon, I want to place it inside the icon central to both horizontal and vertically positions.
|
Object Value
|
|
06.06.2023, 08:40
Have a simple transparent square icon with a solid blue boarder, but rather than the object value being underneath icon, I want to place it inside the icon central to both horizontal and vertically positions.
06.06.2023, 08:58
Use value-center Additional class. Add to Custom JS:
Code: $(function() {
$('.value-center').each(function(_, el) {
var valueel = $('.value', el);
var iconheight = $('.icon', el).height();
var valueheight = valueel.height();
var offset = (iconheight + valueheight) / 2;
valueel.css('margin-top', -offset + 'px').css('padding-top', 0);
});
});
08.06.2023, 21:29
Thank you worked out great
|
|
« Next Oldest | Next Newest »
|