![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have an application that sends HTML emails. The HTML is basically a template that I provide, but part of the HTML is supplied by the user. Sometimes the user inadvertently supplies HTML which cause the the email recipient to have to scroll horizontally to see it. Is there any tag that I can use in my template to enclose the user HTML to make sure that doesn't happen? I've tried enclosing it in <table width="100%"> but that doesn't prevent the problem. |
#3
| |||
| |||
|
|
On 2008-02-06, Jason <Jason.Davis.KC (AT) gmail (DOT) com> wrote: I have an application that sends HTML emails. The HTML is basically a template that I provide, but part of the HTML is supplied by the user. Sometimes the user inadvertently supplies HTML which cause the the email recipient to have to scroll horizontally to see it. Is there any tag that I can use in my template to enclose the user HTML to make sure that doesn't happen? I've tried enclosing it in <table width="100%"> but that doesn't prevent the problem. In general, no, apart from a rule like body { overflow: hidden }. Then they wouldn't be able to scroll, but the missing content would just be clipped, which would be even worse. |
#4
| |||
| |||
|
|
Ben C scribed: On 2008-02-06, Jason <Jason.Davis.KC (AT) gmail (DOT) com> wrote: I have an application that sends HTML emails. The HTML is basically a template that I provide, but part of the HTML is supplied by the user. Sometimes the user inadvertently supplies HTML which cause the the email recipient to have to scroll horizontally to see it. Is there any tag that I can use in my template to enclose the user HTML to make sure that doesn't happen? I've tried enclosing it in <table width="100%"> but that doesn't prevent the problem. In general, no, apart from a rule like body { overflow: hidden }. Then they wouldn't be able to scroll, but the missing content would just be clipped, which would be even worse. How about limiting the body width: body { max-width: 1100px; width:expression(document.body.clientWidth > 1100? "1100px": "100%" ); } |
#5
| |||
| |||
|
|
Ben C scribed: On 2008-02-06, Jason <Jason.Davis.KC (AT) gmail (DOT) com> wrote: I have an application that sends HTML emails. The HTML is basically a template that I provide, but part of the HTML is supplied by the user. Sometimes the user inadvertently supplies HTML which cause the the email recipient to have to scroll horizontally to see it. Is there any tag that I can use in my template to enclose the user HTML to make sure that doesn't happen? I've tried enclosing it in <table width="100%"> but that doesn't prevent the problem. In general, no, apart from a rule like body { overflow: hidden }. Then they wouldn't be able to scroll, but the missing content would just be clipped, which would be even worse. How about limiting the body width: body { max-width: 1100px; width:expression(document.body.clientWidth > 1100? "1100px": "100%" ); } The 2nd line (width:expression....) is to limit the width in IE(6), which doesn't support the max-width property. It's a conditional expression that says 'if the width is greater than 1100px, then width = 1100px, else width = 100%. |
#6
| |||
| |||
|
|
On 2/6/2008 6:02 AM, Ed Jay wrote: Ben C scribed: On 2008-02-06, Jason <Jason.Davis.KC (AT) gmail (DOT) com> wrote: I have an application that sends HTML emails. The HTML is basically a template that I provide, but part of the HTML is supplied by the user. Sometimes the user inadvertently supplies HTML which cause the the email recipient to have to scroll horizontally to see it. Is there any tag that I can use in my template to enclose the user HTML to make sure that doesn't happen? I've tried enclosing it in <table width="100%"> but that doesn't prevent the problem. In general, no, apart from a rule like body { overflow: hidden }. Then they wouldn't be able to scroll, but the missing content would just be clipped, which would be even worse. How about limiting the body width: body { max-width: 1100px; width:expression(document.body.clientWidth > 1100? "1100px": "100%" ); } The 2nd line (width:expression....) is to limit the width in IE(6), which doesn't support the max-width property. It's a conditional expression that says 'if the width is greater than 1100px, then width = 1100px, else width = 100%. Because my eyes are getting older, my screen resolution is 800x600. A max-width of 1100px would still require horizontal scrolling. |
|
Many people still prefer ASCII-formatted E-mail. Some even trash any HTML-formatted messages. |
![]() |
| Thread Tools | |
| Display Modes | |
| |