From 5c0531743c7ac2feb78d3b671f7993c38757396c Mon Sep 17 00:00:00 2001 From: Bruce Date: Fri, 4 Jul 2014 13:22:44 +0200 Subject: [PATCH] Fixed issue in IE where width was rounded down, resulting in margin-right being smaller than intended (leading to input field dropping down to the next line). --- jquery.jlabel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.jlabel.js b/jquery.jlabel.js index cc3c671..9568fc7 100644 --- a/jquery.jlabel.js +++ b/jquery.jlabel.js @@ -121,7 +121,7 @@ .css({ 'position' : 'relative', 'z-index' : '100', - 'margin-right' : -$label.width(), + 'margin-right' : -($label.get(0).getBoundingClientRect().width + 0.01) + 'px', 'left' : opts.xShift + parseInt($input.css("padding-left")) + 'px', 'top' : opts.yShift + 'px' });