If anyone is going through this same trouble, this is the way I figured it out. I had two divs inside a container and in wanted them to have different columns. So i just made for each div a grid. And i put 1fr row, and then the number of columns i wanted. It worked like a charm.