This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Object Value
#1
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.
Reply
#2
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);
  });
});
Reply
#3
Thank you worked out great
Reply


Forum Jump: