Home:ALL Converter>responsive grid (grid-template-columns)

responsive grid (grid-template-columns)

Ask Time:2020-10-10T03:05:41         Author:vUes

Json Formatter

Hello i'm getting used to grid in css and i've used the

display: grid;
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));

a lot of times, but what if i want the divs inside to start with a specific width? I have something like this

<div class="wrapper">
    <div class="right-content">

    </div>
    <div class="left-content">

    </div>
</div>

.wrapper{
        width: 100vw;
        height: 100vh
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }

how do i say that the starting size of the .right-content should be 70% of the .wrapper, cuz if i do width 70% he gets the 70% of the 1fr tha the template columns property gives to him....is there a way to do that?

Author:vUes,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/64285939/responsive-grid-grid-template-columns
yy