mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +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>
14 lines
441 B
HTML
14 lines
441 B
HTML
<!DOCTYPE html>
|
|
<link rel="match" href="../expected/table-margin-auto-inside-flex-item-ref.html" />
|
|
<style>
|
|
* { margin: 0; padding: 0; }
|
|
.flex { display: flex; flex-direction: column; }
|
|
.centering { min-width: 400px; margin: 0 auto; }
|
|
.table { display: table; width: 100%; margin: 0 auto; background: green; }
|
|
</style>
|
|
<div class="flex">
|
|
<div class="centering">
|
|
<div class="table">content</div>
|
|
</div>
|
|
</div>
|