notifyjs
notifyjs copied to clipboard
"top center" position is not in fact in real center
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
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%);
.
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
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%);
}
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%);
}