I am facing an issue with aligning text and icons in a container. I want the text to align far left, and the icons to align far right. Also, the icons should be horizontally oriented according to the length of the text. I have already separated the text and icons into their own div elements.
Below are the CSS properties I am currently using:
chartInputSymbols: { // this class is for the text
overflow: "auto",
float: "right",
},
circlePlus: { // this class will be used for the icons
},
}));
This is the structure of my HTML, where I am utilizing react-materialUI components. I have omitted most of the code for brevity.
<ListItem>
{value}
<ListItemIcon>
<div style={{ marginLeft: "2rem" }}>
<Checkbox/>
</div>
</ListItemIcon>
</ListItem>)
https://i.sstatic.net/5BB4E.png
Can anyone suggest how I can neatly position the text on the far left of my container and the icon on the far right, with equal distance between them?