Material-ui: How to align Timeline to the left by default?

Created on 19 Aug 2020  路  1Comment  路  Source: mui-org/material-ui

Timeline centers itself in the container by default. My use case is that left side will have date and right side content. So left side ("opposite") can be small and left aligned while right side can fill up the remaining area.

This 馃憞
image

I've tried overriding alignment, width and margins to no avail. Is there a way to do this?

Timeline question

Most helpful comment

Hey @AdityaAnand1 by default the Timeline adjust itself in the center, and both content and opposite content have the same width (thye both have flex: 1). If you want to override the styles for the one or the other you can do it, the important thing is to apply those overrides on all opposite contents, or contents, so that the line will not be broken. Take a look on this codesandbox: https://codesandbox.io/s/sleepy-water-ridg6?file=/demo.js

Let me know if this helps

>All comments

Hey @AdityaAnand1 by default the Timeline adjust itself in the center, and both content and opposite content have the same width (thye both have flex: 1). If you want to override the styles for the one or the other you can do it, the important thing is to apply those overrides on all opposite contents, or contents, so that the line will not be broken. Take a look on this codesandbox: https://codesandbox.io/s/sleepy-water-ridg6?file=/demo.js

Let me know if this helps

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

finaiized picture finaiized  路  3Comments

mb-copart picture mb-copart  路  3Comments

iamzhouyi picture iamzhouyi  路  3Comments

FranBran picture FranBran  路  3Comments