Best way to middle content

I’m trying to middle an error message when the contents get fail on the ajax request, what is the better way to do this ? And there is a way to disable scroll when this occurs ?


You could actually do a few things, you could use a popup, or use a custom message. Popups will auto center vertically and horizontally, but the custom message is nicer and still lets people use the app.

That will be nice too, but i want to center/middle a div to the content just like facebook and the user can tap to reply when the error occur

Example img

Then a popup will probably be your best bet