Comments (4)
Thunderbird and Outlook don't respect max-width or percentage-based widths. In the image section of the docs, we recommend that you apply HTML height and width attributes directly to your <img>
tags to restrict the size on desktop browsers (the images will switch to width: auto;
and respect max-width on most mobile clients).
Since you're using the .text-pad
class, you should also keep in mind that the image width will be the column width minus the padding that gets applied (10px on either side), giving you a 560px wide image (with a height of 290px to maintain the aspect ratio). The <img>
tag with the dimension attributes should look like the example below.
<img width="560" height="290" src="/path/to/image/580x300.gif" alt="image is here">
from foundation-emails.
@elm232 Thank you very much for a very clear answer and my apologies for not having understood the docs properly.
from foundation-emails.
Not at all, we'd love your help in making the docs more clear on the issue.
from foundation-emails.
-
My first major issue was I did not know Thunderbird ignored max-width. Also, there appears to be a typo, "Panels" should be "Images". I know there are tonns of resources, but I jumped onto the Ink bandwagon because you guys have made a great resource. If there had been a "note" beside Thunderbird stating max-width was ignored I would have saved considerable time.
Panels work as expected in most major email clients.
-
The heading Retina Images made me (initially) skip it, I would probably rename it to "Images" as the content also applies to desktop images.
-
I would suggest rewording the headings and paragraphs. I wouldn't know what to, I have attempted to do it myself. Here is a poor mans version:
Responsive Images & Desktop
On small screen devices Ink will cause the image to expand to its full width or the width of the parent element (whichever is smaller). On some desktops the width and height must explicitly be declared and the image will not resize.
Example code here
Markup
When using retina or other high resolution images that will be too wide for the parent element, put height and width HTML attributes on the tag. Set the width attribute to correspond with the .columns class used for the parent element using the Column Sizes chart below (this is if you would like the image to fill the parent element). Height should also be explicitly declared on the tag.
Chart goes here
On writing that, I found "On small screen devices, Ink will cause the image to expand to its full width (or the width or its parent element, whichever is smaller)." to be quite confusing. I still don't really understand what the two behaviours are, only that it will be 100% of the parent element width on a small screen if it is really large.
from foundation-emails.
Related Issues (20)
- Install failed with npm (Unsupported engine) HOT 1
- sass and uncss error on build HOT 3
- Invalid CSS after " @return math" HOT 2
- npm run build gives errno1, code ELIFECYCLE HOT 9
- Images not responsive for mobile device with width 300px HOT 1
- Can't build email project. What versions of node should I use? What SASS should I be using? HOT 9
- [data-ogsc] prefixed CSS is discarded on compilation
- All images in example templates are broken
- Visibility Classes not being respected in Outlook for Android (Need Work Around) HOT 1
- `$button-color-alt` is unused/ignored
- What are officially supported node versions? HOT 1
- Node modules not installed for emails framwork HOT 1
- Responsive/mobile layout misbehaving - grid layout HOT 3
- Panini and variables HOT 1
- Unable to install the package on Mac M1 pro HOT 3
- broken github-info-link
- Documentation Links on website are broken!! https://get.foundation/emails/docs/ HOT 1
- Installation problems on Mac 14.1 HOT 1
- Maximum line length exceeded (see RFC 5322 2.1.1)
- Remove line-height from Button's generated code HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foundation-emails.