Code Reference

Layout & Box Properties

CSS · Methods reference

CSS · Methods reference


📋 Overview

Box model, positioning, display, overflow, and sizing.

🔧 Methods

Box model

PropertyDescription
width / heightContent size (with box-sizing)
min-width / max-width / min-height / max-heightBounds
box-sizingcontent-box
margin / padding / borderSpacing and border shorthand
aspect-ratioPreferred width/height ratio

Position & display

PropertyDescription
displayblock
positionstatic
top / right / bottom / leftOffsets for positioned elements
z-indexStacking order (positioned/flex/grid)
overflow / overflow-x / overflow-yClip or scroll
visibility / opacityHide vs remove from layout
object-fit / object-positionReplaced content sizing

💡 Examples

See parent topic notes for runnable snippets; this page is the complete method index.

⚠️ Pitfalls

  • Mutating methods return None in Python — do not chain sort() / reverse() expecting a new list.
  • Default JS sort() compares strings — pass (a,b) => a-b for numbers.
  • SQL function names differ by dialect — verify Postgres vs MySQL docs.
  • Django QuerySet.update() skips save() signals and auto auto_now fields on models.

On this page