openstreetmap-website/app/views/notifier/_message_body.html.erb
Herve Saint-Amand fcba1a9857 A better way to contrain the width of the message box whilst also allowing it to shrink on narrow displays
Setting a hard "width" it very compatible, but won't squeeze on narrow screens. Setting max-width works well, except in Outlook and Hotmail. We resort to old skool table tricks: a table with width=100%, with 3 columns, only oneof which, the middle one, had content, and a fixed with. This works.
2017-02-12 12:04:43 +00:00

21 lines
630 B
Text

<table style="font-size: 15px; margin: 15px 0px; background-color: #eee; width: 100%">
<tr>
<td style="width: 50px; min-width: 50px; vertical-align: top; padding: 15px">
<%= link_to(
image_tag(
attachments["avatar.png"].url,
alt: @author,
title: @author,
width: 50,
height: 50,
border: 0
),
user_url(@author, :host => SERVER_URL),
:target => "_blank"
) %>
</td>
<td style="text-align: left; vertical-align: top; padding-right: 10px; width: 100%">
<%= body %>
</td>
</tr>
</table>