Antonoff
@Antonoff
Разработчик

Как вы боритесь с проблей в max-width в Outlook?

Назрел вопрос, кто как решает проблему с Outlook, который не видит max-width?

У кого какие, грабли есть?
  • Вопрос задан
  • 1665 просмотров
Решения вопроса 2
dudeonthehorse
@dudeonthehorse
Email Developer
<!--[if gte mso 9]>
	Делай с аутлуком что угодно
<![endif]-->
<!--[if lte mso 9]>
    Делай с аутлуком что угодно
<![endif]-->


А вот для theBat! решения к сожалению нет.

Я так понимаю речь о том, чтобы сделать враппер в аутлуке фиксированным а на мобильнике адаптивным. Я в аутлуке это делаю так:
<!--[if gte mso 9]>
	<style>
		.wrapper { width:600px !important; }
 	</style>
<![endif]-->
<!--[if lte mso 9]>
    <style type="text/css">
        .wrapper { width:600px !important; }
    </style>
<![endif]-->


Поясню наличие двух условных комментариев. Один из них для Аутлука на базе IE6, другой на базе MS Word. Уже и не помню какой из них какой, если честно.

Базовый адаптивный шаблон у меня:
<meta charset="utf-8">
<style>
	body { margin:0; }
  	@media only screen and (min-width: 600px) {
  		/* Wrapper Fix */
		.wrapper { width:600px !important; }
	}
	@media only screen and (max-width: 600px) {
		/*  All Mobile Media Queries */
	}
</style>
<!--[if gte mso 9]>
	<style>
		.wrapper { width:600px !important; }
		.flex-item { width:100% !important; }
 	</style>
<![endif]-->
<!--[if lte mso 9]>
    <style type="text/css">
        .wrapper { width:600px !important; }
    </style>
<![endif]-->
<table bgcolor="#eeeeee" width="100%" cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
<tr>
	<td>
		<table width="600" class="wrapper" align="center" bgcolor="#ffffff" cellpadding="0" cellspacing="0" style="border-collapse:collapse; margin:auto; width:auto; max-width:600px;">
		<tr>
			<td>
				As they rounded a bend in the path that ran beside the river, Lara recognized the silhouette of a fig tree atop a nearby hill. The weather was hot and the days were long. The fig tree was in full leaf, but not yet bearing fruit.
Soon Lara spotted other landmarks—an outcropping of limestone beside the path that had a silhouette like a man’s face, a marshy spot beside the river where the waterfowl were easily startled, a tall tree that looked like a man with his arms upraised. They were drawing near to the place where there was an island in the river. The island was a good spot to make camp. They would sleep on the island tonight.
Lara had been back and forth along the river path many times in her short life.
				<br><br>
				Her people had not created the path—it had always been there, like the river—but their deerskin-shod feet and the wooden wheels of their handcarts kept the path well worn. Lara’s people were salt traders, and their livelihood took them on a continual journey.
At the mouth of the river, the little group of half a dozen intermingled families gathered salt from the great salt beds beside the sea. They groomed and sifted the salt and loaded it into handcarts. When the carts were full, most of the group would stay behind, taking shelter amid rocks and simple lean-tos, while a band of fifteen or so of the heartier members set out on the path that ran alongside the river.
With their precious cargo of salt, the travelers crossed the coastal lowlands and traveled toward the mountains.
				<br><br>
				But Lara’s people never reached the mountaintops; they traveled only as far as the foothills. Many people lived in the forests and grassy meadows of the foothills, gathered in small villages. In return for salt, these people would give Lara’s people dried meat, animal skins, cloth spun from wool, clay pots, needles and scraping tools carved from bone, and little toys made of wood.
Their bartering done, Lara and her people would travel back down the river path to the sea. The cycle would begin again.
			</td>
		</tr>
		</table>
	</td>
</tr>
</table>
Ответ написан
Antonoff
@Antonoff Автор вопроса
Разработчик
Я лично пользуюсь:

<!--[if mso]>
 <center>
 <table><tr><td width="580">
<![endif]-->
 <div style="max-width:580px; margin:0 auto;">
 
 <p>This text will be centered and constrained to 580 pixels even on Outlook which does not support max-width CSS</p>
 
 </div>
<!--[if mso]>
 </td></tr></table>
 </center>
<![endif]-->
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы
22 нояб. 2024, в 00:55
500 руб./за проект
21 нояб. 2024, в 23:30
300000 руб./за проект
21 нояб. 2024, в 22:21
3000 руб./в час