here's updated code: div#popupContact { position: absolute; left: 50%; top: 50%; font-family: 'Raleway',sans-serif; background: #4b3c36; padding: 20px; width: 510px; -ms-transform: translate(-50%,-50%); -webkit-transform: translate(-50%,-50%); -moz-transform: translate(-50%,-50%); -o-transform: translate(-50%,-50%); transform: translate(-50%,-50%); } Code (CSS): this will center your popup horizontally / vertically, regardless of width.
Thanks works like a charm, any idea about the mobile what should I add? Currently I've margin-ed for mobile.
Just remove your mobile target on 'div#popupContact ' the above code is enough to center it from desktop, tablet, mobile. - except the width: 510px; make sure to make it width: 100%; on below 510px breakpoints.