Skip to content

CSS margin auto is not working #67

@rodarima

Description

@rodarima

The red div should appear in the center:

image

Tested with:

<!DOCTYPE html>
<html>
  <head>
    <title>Test CSS margin auto</title>
    <style>
      div {height:100px}
      .container {width:300px; background: lightgreen}
      .child {width:100px; background: brown; margin:auto }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="child"></div>
    </div>
  </body>
</html>

This breaks a lot of pages that rely on this method to center content on the page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CSSbugSomething isn't workinglayoutLayouting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions