added mouse behaviours + compute margin with a table of widths which can be easily updated on window resize