10930 shaares
387 private links
387 private links
Put all the items in the same cells
header {
display: grid;
grid-template-areas: "heros";
> * {
grid-area: hero;
}
}
Hero 1 summary
object-fitused to controlimgsize
align-items: centerused to vertically align the grid children
Hero 2 summary
created a color screen over the
imgby definingbackground-colorof theheaderwithrgbaand addingz-index: -1to theimgto slide it behind theheader
used pseudo-elements for additional design flair, and positioned them separately from the parent grid definition withplace-self
Hero 3 summary
use of a wrapper to provide a secondary grid layout for content versus
headerdesign elements
creation of auto-width columns withgrid-template-columns
Leveragingvminto minimize padding on smaller viewports and increase it for larger viewports