Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.63 KB

README.md

File metadata and controls

53 lines (35 loc) · 1.63 KB

49. Browser developer tools

Diagnose layout and cascade problems systematically.

Learn

  • Elements
  • Computed
  • box model
  • grid and flex overlays
  • device emulation
  • accessibility tree

Build

Find and fix three deliberately introduced layout bugs.

Check your work

  • Open the result in a browser and inspect the HTML and computed CSS.
  • Test at narrow and wide widths and use the keyboard for interactive elements.
  • Write down one thing you changed after testing.

Deep lesson

How it works

Developer tools let you observe the page rather than guess. Elements shows the live tree, Styles lists competing declarations, Computed shows resolved values, and box model diagrams explain dimensions. Flex and Grid overlays reveal tracks and alignment. Device emulation helps explore widths, while the accessibility tree shows names and roles. Reproduce one issue, inspect it, change one rule, and verify the effect.

Common mistake

Randomly adding overrides can hide a bug while increasing CSS complexity. Find the original rule or content constraint first.

Guided challenge

Debug the intentionally wide card in the example. Record the cause, the exact CSS change, and a screenshot or measurement showing the fix.

Completion check

  • Rebuild the core idea without copying the example line by line.
  • Explain the key HTML or CSS choice in your own words.
  • Test the result at a narrow width and with keyboard navigation where relevant.

Run the example

Open example.html in a browser. Edit style.css, save, and refresh.

Try: Use developer tools to fix the overflow with box-sizing: border-box.