Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

grid columns

.hero {
  /* Photo by mnm.all on Unsplash */
  background: url('https://images.unsplash.com/photo-1518176258769-f227c798150e') center;
  background-size: cover;
  padding: 4rem 2rem;

  /* Grid styles */
  display: grid;
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
Source by css-tricks.com #
 
PREVIOUS NEXT
Tagged: #grid #columns
ADD COMMENT
Topic
Name
5+2 =