Center div in Microsoft Outlook

前端 未结 3 676
北荒
北荒 2021-02-05 05:47

I used

to center the container div.

In the browser it works, but when I open it in Micro

相关标签:
3条回答
  • 2021-02-05 06:08
    <div align="center">
    
    your code 
    
    </div>
    

    Only for Outlook

    0 讨论(0)
  • 2021-02-05 06:13

    For emailing in general it is better to do use html attributes and deprecated tags instead of their CSS equivalents because some messaging systems ignore inline styles.

    For example, instead of:

    <div style="width: 742px; margin: 0px auto; ">...
    

    You can use:

    <body align="center"><table align="center" width="742">...
    

    Or

    <div align="center">...
    

    Example 2, instead of:

    <p style="font-family: Arial, Helvetica, Tahoma, sans-serif;">My text</p>
    

    You can do:

    <font face="Arial" size="4">My text</font>
    
    0 讨论(0)
  • 2021-02-05 06:13

    A good reflex is to go on the official Microsoft Documentation Network: http://msdn.microsoft.com/en-us/library/aa338201.aspx

    Here you can see that the best method is to use.. another thing than a div element.

    Use a table, it allow the maximum of css control.

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