mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
Previously, a table with `width: 100%` and `margin: auto` whose content was narrower than the viewport would be centered based on content width rather than filling the containing block. Resizing the viewport wider than the content would shift the table progressively further to the right. Co-authored-by: Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
13 lines
325 B
HTML
13 lines
325 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
* { margin: 0; padding: 0; }
|
|
.flex { display: flex; flex-direction: column; }
|
|
.centering { min-width: 400px; margin: 0 auto; }
|
|
.block { width: 100%; background: green; }
|
|
</style>
|
|
<div class="flex">
|
|
<div class="centering">
|
|
<div class="block">content</div>
|
|
</div>
|
|
</div>
|