React-toastify: Custom container position

Created on 22 Oct 2018  路  3Comments  路  Source: fkhadra/react-toastify

Hello,

Thanks for a great library!

I'm wondering if there is any way to set the ToastContainer position to another value than the predefined ones. I am using top-left position, but as I have a navbar on top of my app I would like the margin to the top of the screen to be larger.

Managed to fix it temporarily by adding

.Toastify__toast-container--top-left {
  top: 4em !important;
}

to my App.css file but this feels a bit hacky.

Most helpful comment

You should be able to add a className to your ToastContainer and then style against that class (without the !important).

All 3 comments

You should be able to add a className to your ToastContainer and then style against that class (without the !important).

@evansjohnson of course, thanks!

I created my own class, but it still needs the !important.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joetidee picture joetidee  路  3Comments

JaLe29 picture JaLe29  路  5Comments

SmileSydney picture SmileSydney  路  4Comments

LouisCuvelier picture LouisCuvelier  路  3Comments

fkhadra picture fkhadra  路  3Comments