Margin: Auto not working in IE

前端 未结 9 1219
悲哀的现实
悲哀的现实 2021-02-19 03:50

URL: http://cyberbat.co.uk/test container margin: auto is not working, is there any other way to put it in the middle in IE.

EDIT: Check it again, the index.php was the

相关标签:
9条回答
  • 2021-02-19 04:28

    Use this on parent container for stupid browsers:

    text-align: center
    
    0 讨论(0)
  • 2021-02-19 04:28
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    

    Your problem is define your file type and standards. if you add to this code to top of your file it will work!

    0 讨论(0)
  • 2021-02-19 04:30

    This is a bug in IE! You just need to create a holder for <div class="page"> and set its text-align to center

    .page-holder{
        text-align:center;
    }
    .page{
        margin:0 auto;
    }
    <div class="page-holder">
        <div class="page">
        page content
        </div>
    </div>

    0 讨论(0)
提交回复
热议问题