Just sick, tried to debug this for an hour. Why the table is stretch by the content? I have wrap the layout properly with tr
and td
. I'm designing html for emails.
why the width:600px doesn't work on the table?
add table-layout: fixed;
Please see http://jsfiddle.net/qse5owx6/5/
see here jsfiddle
well this happens because you've set specific fixed widths ( in pixels ) to all the elements , that's why you can't force the table to a smaller width.
i suggest you use percentages as widths for the elements inside the table. for example
tbody { width:100%;}
tr { width:100%;}
td { width:50%;}
OR if you want to keep the widths of the elements fixed (873px) you could wrap all the table inside a div like .wrapper
and add
.wrapper {
width:600px;
overflow:auto;
}
see here : jsfiddle
I did some research to create email templates.
I hope this will help you in this.
The steps to create email templates are:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.