Search
 
SCRIPT & CODE EXAMPLE
 

CSS

displat grid overlapping columns

article {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 50px;
  grid-gap: 5px;
}

section:nth-child(1) { grid-column: 1 / 4; grid-row: 1; z-index: 1; }
section:nth-child(2) { grid-column: 3 / 5; grid-row: 1; }
section:nth-child(3) { grid-column: 5 / 7; grid-row: 1; }

@media ( max-width: 500px ) {
   article { grid-template-columns: 100px; justify-content: center; }
   section:nth-child(1) { grid-row: 1 / 4; grid-column: 1; }
   section:nth-child(2) { grid-row: 3 / 5; grid-column: 1; }
   section:nth-child(3) { grid-row: 5 / 7; grid-column: 1; }
}

/* non-essential demo styles */
section:nth-child(1) { background-color: lightgreen; }
section:nth-child(2) { background-color: orange; }
section:nth-child(3) { background-color: aqua; }
section {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2em;
}
Comment

PREVIOUS NEXT
Code Example
Css :: css animate svg circle radius 
Css :: css text to fit container 
Css :: sass mixin 
Css :: add textcontent on hover 
Css :: clearfix 
Css :: get ssl certificate command line 
Css :: center background image in css 
Css :: css move element to the right 
Css :: css tricks stretch content full witdh 
Css :: hide the scrollbar in css if not overflow 
Css :: css horizontal line around text 
Css :: backgroud color css 
Css :: css affect all child elements 
Css :: css padding syntax 
Css :: how to change logo size in wordpress 
Css :: round image css 
Css :: html css bring to page top 
Css :: png image border css 
Css :: css 4 modal 
Css :: css battle tesseract 
Css :: how to make width equal to height css 
Css :: remove background from image 
Css :: gap between two flex items 
Css :: fontawesome trash icon 
Css :: border style 
Css :: tampermonkey custom css 
Css :: java to python 
Css :: vertical align h1 inside div 
Css :: animation clip path 
Css :: css local variable 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =