We finally learned to center a div, then browsers added sidebars

Centering page content relative to the entire browser window—rather than just the visible viewport—has prompted pushback from developers and users who rely on sidebars, vertical tabs, and tiled window setups. Critics argue that trying to keep a fixed-width “centered” column physically in the middle of the screen leads to content being obscured by browser UI, breaks expected layout behavior, complicates accessibility and responsiveness, and leaks extra information about the user’s environment. Many commenters see such hacks as browser-level concerns at best, or outright user-hostile at worst, and prefer that sites center only within the viewport and ignore surrounding chrome.

What “centering a div” means

  • Some readers interpret “centering a div” as horizontal only (margin: 0 auto), others as both horizontal and vertical centering.
  • The article’s use of the meme-y phrase is seen by some as mismatched with its mainly horizontal, sidebar-focused topic.

Viewport vs window/screen centering

  • Core disagreement: should “centered” content be centered in the viewport (the visible page area) or relative to the browser window / screen when sidebars are open?
  • Many argue strongly that centering must be within the viewport: the sidebar reduces usable width, so content should move accordingly.
  • A minority like the idea of content staying fixed at the physical screen center even when browser sidebars open, but they mostly see it as a personal preference suitable for an extension, not as default web behavior.
  • Several note that window position, multiple monitors, tiling WMs, and non-maximized windows make “screen-centered” semantics nonsensical or actively wrong.

Usability and design opinions

  • A large group views covering content with browser sidebars as clearly bad UX and “not the page’s business.”
  • Others say a browser’s job is to manage overlays/sidebars; if a sidebar should behave like an overlay, that should be a browser setting, not page logic.
  • Some object to the article’s page design itself: faux “paper” with inner scroll containers, scroll behavior that differs from native scrolling, and very narrow content widths.
  • Counterpoints invoke typographic research favoring shorter line lengths; these “optimal width” rules are viewed by some as helpful, by others as dogmatic and at odds with user preference.

Technical and implementation issues

  • Multiple reports say the demo does not behave as described in Firefox or Chromium, or only sometimes, and exhibits flicker and race conditions when toggling sidebars.
  • Using extra JS to fight the browser’s layout is criticized as brittle, visually jarring, and likely to break in edge cases.

Privacy and web API concerns

  • Using screenX/screenY, window size, and related APIs to infer window placement is seen as another fingerprinting and information-leak vector.
  • Some express broader skepticism about new web APIs that let sites reason about host UI outside the viewport.