How can I make the first and last column of a grid fixed-width?

How can I make the first and last column of a grid fixed-width?

I would like to have a grid with the 1st column of 50px, the last one with 50px too and all the columns in the middle (don't know the amount of columns) to have 1fr.

I would like to have a grid with the 1st column of 50px, the last one with 50px too and all the columns in the middle (don't know the amount of columns) to have 1fr.

I've tried with grid-template-columns: 50px repeat(auto-fit, minmax(100px, 1fr)) 50px; but with no luck.

body {
    font:normal normal 0.8em/0.7em Calibri, Arial, Helvetica;
}
.container {
    background:peru;
    padding:10px;
    display:grid;
    grid-template-columns: 50px repeat(auto-fit, minmax(100px, 1fr));

/* grid-template-columns: 50px repeat(auto-fit, minmax(100px, 1fr)) 50px; ????*/

} .container div { background:#f0ff00; margin:5px; padding:5px; text-align: center; color:#333333; } <div class="container"> <div class="item1">Item 1 - 50px</div> <div class="item2">Item 2 - 1fr</div> <div class="item3">Item 3 - 1fr</div> <div class="item4">Item 4 - 1fr</div> <div class="item5">Item 5 - 1fr</div> <div class="item6">Item 6 - 1fr</div> <div class="item7">Item 7 - 1fr</div> <div class="item8">Item 8 - 50px</div> </div>


https://jsfiddle.net/gb1knso0/

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

HTML 5 Tutorial: How to create a table using HTML tags and Stylesheet (CSS)

In this article, we want to show you how to create a table using HTML tags and Stylesheet (CSS). HTML table may vary depends on data and style requirements. Sometimes, in the real application, we use an HTML table as a layout of the Email template in HTML format.

Introduction To HTML & CSS: Web Development For Beginners

Introduction To HTML & CSS: Web Development For Beginners - Complete HTML & CSS web developer bootcamp. Learn & practice website design using HTML5 & CSS3 web development resources

How to performance Improve of HTML and CSS

There are a variety of ways you can improve your HTML and CSS performance, Follow each step and it can help you