HubSpot / messenger

Growl-style alerts and messages for your app. #hubspot-open-source
http://github.hubspot.com/messenger/
MIT License
4.02k stars 405 forks source link

Is there messenger-on-center in extraClasses? #78

Closed clinyong closed 9 years ago

clinyong commented 10 years ago

I want to set the message box in the center of the screen, but the official doc seems not to support this option in extraClasses.

geekjuice commented 9 years ago

While it's not officially supported yet, you could add a custom class in your stylesheets e.g. messenger-center that centers the dialog. A simple (albeit naive and potentially flawed) solution could be:

.messenger-center {
    top: 50%;
    left: 50%;
    width: 350px;
    margin-left: -175px;
}

While this will work, remember that Messenger can stack and will generally start to look janky at that point. However, if you are looking for a alert-style dialog box, HubSpot actually has another project that does just that called Vex that you should definitely check out. :smile: