notifyjs icon indicating copy to clipboard operation
notifyjs copied to clipboard

"top center" position is not in fact in real center

Open chrisiek opened this issue 8 years ago • 4 comments

Hi,

If you look closely at the "top center" global position, it is not in center. The problem appears when you're getting the screen smaller. Is it a feature or a bug?

Chris

chrisiek avatar Jul 18 '16 09:07 chrisiek

I looked closer and div.notifyjs-corner, which contains text, has style left: 45%. Text is with different length, so this css style is wrong. It should be left: 50% with transform: translateX(-50%);. For middle vertical positioning it should be transform: translateY(-50%);.

PreVaDu avatar Jul 19 '16 21:07 PreVaDu

With top center I also hit an issue with longer notification text going off screen. I filed a separate issue though as IMO wrapping might be an issue with other positions as well. See #79

akostadinov avatar Aug 23 '16 19:08 akostadinov

yes,I think this bug should bu fixed. as I only need it position top and center,so I do like this

.notifyjs-corner {
    left: 50% !important;
    transform: translateX(-50%);
}

CurryHan avatar Dec 21 '17 09:12 CurryHan

yes its working fine with $.notify($t("Product Added Successfully"), { clickToHide: true, autoHide: true, showDuration: 400, autoHideDelay: 5000, position: 'top', className: "success" }

			and in css
			
			.notifyjs-corner{
                                z-index:99999 !important;
                                left: 50% !important;
                                transform: translateX(-50%);
                       }
			
			

tatva-priya avatar Dec 05 '22 09:12 tatva-priya