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/

html css css3

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Know Everything About HTML With HTML Experts

HTML Assignment Help Australia @30% OFF from Sample Assignment, with Our Best HTML assignment help experts. Get HTML homework help online at affordable price. 100% Plag free assignment solution.

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.

HTML And CSS Tutorial For Beginners | Complete HTML & CSS Course In One Tutorial

In this video you will learn basics of HTML and CSS from beginning. This HTML and CSS course is best for Beginners to start learning web design and web development. In this HTML and CSS Beginners tutorial we will discuss all the important HTML tags, CSS properties to design the website with some example and explanation. We will also learn about animation using CSS.

Stay at Home Animation in HTML CSS - Covid-19 | SVG to HTML CSS |

Stay at home Animation in html css - COVID-19 . Adobe illustrator SVG To HTML CSS Animation . corona-virus. Adobe illustrator to HTML & CSS Animation.

Hire CSS Developer

Want to develop a website or re-design using CSS Development? We build a website and we implemented CSS successfully if you are planning to **[Hire CSS Developer](https://hourlydeveloper.io/hire-dedicated-css-developer/ "Hire CSS Developer")**...