I'm using toastr-ng2 and I want the location of the toast to be under the header of my webpage (e.g. style="margin-top: 30px"
).
I can't seem to find the settings for this option. Is this possible?
Asked
Active
Viewed 1,344 times
0

ToDo
- 754
- 2
- 17
- 31
1 Answers
1
I found an easy way to do this. By inspecting the page element when the toastr is displayed, you can get the css that's used. Then modify the code and add it to the styles.css file which can overwrite the default toastr settings.
E.g.
#toast-container.toast-top-center .toast,
#toast-container.toast-bottom-center .toast {
margin-top: 50px;
}

ToDo
- 754
- 2
- 17
- 31
-
For completeness its also good to mention that there are a list of position classes that are suitable for most needs: https://www.npmjs.com/package/ng2-toastr#positionclass-string – Oct 18 '17 at 07:07