score:1
If you are using flex on the parent element, you can try setting align-items: stretch
on the parent too. This should stretch all children of that element to be the same height. E.g.
.container {
display: flex;
align-items: stretch;
}
score:2
In material ui you can use alignItems="stretch"
on the container Grid as you can see in the below code:
<Paper elevation={10} style={{padding:'1.5em'}}>
<Grid container direction='row' spacing={2} alignItems="stretch">
<Grid item style={{height:'100%', width:'50%'}}>
</Grid>
<Grid item style={{height:'100%', width:'50%'}}>
</Grid>
</Grid>
</Paper>
And you didn't need to set style={{display:'flex'}}
because of grid style set it too.
References:
Source: stackoverflow.com
Related Query
- Make two grid items for Material-UI both same height with Flex-box
- Can't make an MP4 movie height to change and fit in Material Box both landscape and portait
- React Material UI Grid Horizontally Align Items for Containers With Different Number of Items
- Make two elements the same height dynamically with CSS
- Material-UI: Grid items with same height
- CSS grid make items same height
- How to make one component height in one grid column adjust with respect to the other two in one single column?
- Make child of Material UI Grid item stretch to fit the remaining height of the parent container
- Problem with using Material UI <Grid> for two column layout
- How can I have two headers columns for the same column in a material UI table?
- Convert two arrays to one object, with same key for each array in Javascript
- For object with multiple arrays, return array based on checking two values inside the same array
- How to make flex box with limit 2 elements per row?
- reactjs form: with two submit buttons doing two different tasks for same form
- Two routes with different query strings for the same component
- What can i pass in as placeholder for first argument in map function Warning: Encountered two children with the same key, `[object Object]`
- Material UI Grid not working properly with Paper Component for nested Grid
- constant height for carousal with items having different height
- how to place cards horizontally in material ui with same height
- Is there a way for some grid items to start from left and some for the right in same line?
- cant array.map with css grid to make table for dynamic data
- How can I make a border for an Avatar like on facebook with material ui in react?
- How do I align two Grid items left and one right in Material UI when the first Grid item is a fixed width?
- checked box need to be click 2 time to make it check i have tried with onclick as well it is giving same behaviour i need to disable button oncheck
- Warning: Encountered two children with the same key for react infinite scroll
- How to make border around material ui grid items only
- Flex Box Items not aligning with the above row
- How to get the label and values from multiple TextArea material ui with same onchange function for all?
- Material UI make 2 elements the same height
- How to make each Card the same size in my Material Grid
More Query from same tag
- Getting toogleShow is not function when passing as props in react typescript functional component
- Webpack-dev-server Cannot find module 'webpack-cli/bin/config-yargs'
- Render images from files array on client with Reactjs
- Could not type any character in TextField with name="lenghts.byDay"?
- is there any way to save the value of onChange?
- setState to window variable once on componentDidUpdate
- How to push new value to Store object?
- Get translation text without using FormattedMessage and React ContextTypes
- react js map function can not render the custom component
- React <input>: Dismiss soft keyboard on enter
- React with express server giving me 400 on post
- Type '{}' is not assignable to type 'IProps'
- show loader while fetching initial data in react-redux component
- React functional component un-mounts/mounts the parent component after setting state
- React Context Provider is not passing the values
- Mocking simple internal function using Jest for use in rendered React component
- gltf file is not showing in react nextjs
- optional export in reactjs
- MaterialUI/CSS create this box
- Need browsers refresh to get data displayed after user Login in react using redux
- Typing props spread when using InferProps<> from prop-types
- Heroku react deploy
- Updating UI after state update in Redux
- TypeError: Cannot read property 'setState' of undefined in sweetAlert
- Add new user on button click in reactJS
- How to deploy a Ruby on Rails backend API with React to Heroku
- Recharts - add commas to number on tooltip on bar chart
- How to filter and modify an array of objects with a single line of code?
- Slow loading web page
- changing the color of the underline or space between the title and body of popover bootstrap in react