Developer Encyclopedia

Learn to Code — CodePrimer

A classroom encyclopedia of HTML5, CSS3, JavaScript, PHP 8, SQL, and Laravel. Search a guide, then follow the learning path from beginner to advanced.

Clear
Popular:

Tag filter: #layout Remove

Showing 23 of 291 guides

HTML5 Beginner

The wbr Element for Optional Breaks

How do I let a long path wrap without adding spaces?

Semantic Structure 6 min
HTML5 Beginner

Semantic navigation bar

How do I mark up a site nav?

Layout 1 min
CSS3 Beginner

The CSS Box Model and border-box Sizing

How do width, padding, border, and margin add up?

Modern Layout 7 min
CSS3 Beginner

CSS Margin, Padding, and Margin Collapse

When does vertical margin collapse, and how do I space elements?

Modern Layout 8 min
CSS3 Beginner

CSS Flexbox: Direction, Alignment, Gap, and Grow

How do I lay out a row of items with Flexbox?

Modern Layout 9 min
CSS3 Beginner

CSS Flex Wrap and Gap for Wrapping Toolbars

How do I let flex items wrap without float hacks?

Modern Layout 7 min
CSS3 Beginner

Center an Element with Flexbox

How do I center a box horizontally and vertically?

Modern Layout 6 min
CSS3 Beginner

CSS Grid Two-Column Layout with a Sidebar

How do I build a content column and a sidebar with Grid?

Modern Layout 8 min
CSS3 Intermediate

CSS Grid: minmax, auto-fit, and grid-template-areas

How do I make a responsive card grid without media queries?

Modern Layout 9 min
CSS3 Intermediate

CSS Positioning: relative, absolute, fixed, sticky, and z-index

How do relative, absolute, fixed, and sticky positioning differ?

Modern Layout 8 min
CSS3 Beginner

CSS object-fit and object-position for Replaced Media

How do I crop a photo inside a fixed box without stretching it?

Modern Layout 7 min
CSS3 Beginner

CSS aspect-ratio for Stable Media Frames

How do I reserve a 16:9 box before the image arrives?

Modern Layout 6 min
CSS3 Intermediate

CSS Logical Properties

How do I write margin and padding that follow writing direction?

Modern Layout 7 min
CSS3 Intermediate

CSS Scroll Snap

How do I make a horizontal card row snap into place?

Modern Layout 7 min
CSS3 Advanced

CSS Subgrid

How do I align nested grid items to the parent tracks?

Modern Layout 8 min
CSS3 Beginner

CSS overflow for Long Code and Menus

How do I scroll a code sample without stretching the page?

Modern Layout 6 min
CSS3 Intermediate

CSS writing-mode for Vertical Labels

How do I set a vertical spine label without rotating the whole card?

Modern Layout 6 min
CSS3 Intermediate

CSS scrollbar-gutter

How do I stop a list from shifting when a scrollbar appears?

Modern Layout 6 min
CSS3 Intermediate

CSS hyphens for Narrow Columns

How do I break long words in a narrow lesson column?

Modern Layout 6 min
CSS3 Advanced

CSS isolation for Stacking Contexts

How do I stop a card shadow from mixing with a popup z-index?

Modern Layout 6 min
CSS3 Beginner

display block inline flex

How does display change layout?

Layout 1 min
CSS3 Beginner

Space-between header layout

How do I put logo left and links right?

Layout 1 min
JavaScript Intermediate

ResizeObserver for Responsive Components

How do I react when a card changes width, not the window?

Browser APIs 6 min

Need more coins?

You do not have enough coins for this action.

Your balance: 0 coins

Share

Reactions

Loading reactions…