layout: Make margin: auto work properly with tables.

Improves the Amazon home page.
This commit is contained in:
Patrick Walton 2015-04-24 14:48:45 -07:00
parent ae99a17a1b
commit 44a30054a1
9 changed files with 246 additions and 98 deletions

View file

@ -296,6 +296,7 @@ experimental == rtl_simple.html rtl_simple_ref.html
== table_expansion_to_fit_a.html table_expansion_to_fit_ref.html
== table_float_translation_a.html table_float_translation_ref.html
== table_intrinsic_style_specified_width_a.html table_intrinsic_style_specified_width_ref.html
== table_margin_auto_a.html table_margin_auto_ref.html
== table_padding_a.html table_padding_ref.html
== table_percentage_capping_a.html table_percentage_capping_ref.html
== table_percentage_width_a.html table_percentage_width_ref.html

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<style>
body, html {
margin: 0;
}
table {
margin: auto;
width: 0px;
border-spacing: 0;
border: none;
}
</style>
</head>
<body>
<table><tr><td>Foooooooooooooooooooooooooooooo</td></tr></table>
</body>
</html>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<style>
body, html {
margin: 0;
}
body {
text-align: center;
}
div {
position: relative;
top: 1px;
}
</style>
</head>
<body>
<div>Foooooooooooooooooooooooooooooo</div>
</body>
</html>