Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the -mso- prefix for in CSS?

I understand what other browser specific code names such as -moz- and -webkit- are used, the former for mozilla and the later for chrome and safari, but what is -mso- exactly? It stands for Microsoft Office, but a web page is never brought up in that program, is it?

like image 988
Joseph Avatar asked Sep 21 '11 21:09

Joseph


2 Answers

Your example code:

<style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style>

Looks like what would happen if someone copied and pasted text from a Microsoft Word Document into a WYSIWYG editor in a content management system.

MS Word puts in a ton of nasty code that is not needed. It's better to tell your content authors to paste in plain text instead of from MS Word.

like image 158
llovelett Avatar answered Oct 22 '22 04:10

llovelett


Mso- attributes are used for coding HTML Emails. Since Outlook 2007, Microsoft decided to use the Word rendering engine in their email client. This creates a lot of quirks in how HTML Email shows up in Outlook, thus the need to use mso- attributes in HTML.

like image 41
Jon Avatar answered Oct 22 '22 04:10

Jon