Click here to get back home

prevent horizontal scrolling

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
prevent horizontal scrolling Jason 02-05-2008
Posted by Jason on February 5, 2008, 10:47 pm
Please log in for more thread options
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.

Posted by Ben C on February 6, 2008, 3:14 am
Please log in for more thread options
> 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.

Posted by Ed Jay on February 6, 2008, 9:02 am
Please log in for more thread options
Ben C scribed:

>> 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%.
--
Ed Jay (remove 'M' to respond by email)

Posted by Ben C on February 6, 2008, 10:34 am
Please log in for more thread options
> Ben C scribed:
>
>>> 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%" );
> }

It doesn't make any difference. Descendents can still overflow the body.

There's no way to stop someone putting

<div style="width: 10000px">

in the document. If they do it will overflow, and either be clipped, or
be scrollable-to (I haven't encountered a UA that implemented overflow:
visible on the viewport).

Posted by David E. Ross on February 6, 2008, 12:48 pm
Please log in for more thread options
On 2/6/2008 6:02 AM, Ed Jay wrote:
> Ben C scribed:
>
>>> 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.

--
David Ross
<http://www.rossde.com/>

Have you been using Netscape and now feel abandoned by AOL?
Then use SeaMonkey. Go to <http://www.seamonkey-project.org/>.

Similar ThreadsPosted
Is horizontal scrolling okay? December 28, 2004, 2:52 pm
Always turning off horizontal scrolling in an iframe January 23, 2005, 9:36 pm
Can I prevent an item from scrolling with the page? December 7, 2005, 12:56 pm
creating a scrolling and non-scrolling area on the page November 10, 2006, 10:12 am
Is it possible to keep this on the same horizontal? February 15, 2008, 1:33 pm
Horizontal row of images... June 20, 2005, 10:04 am
Horizontal scroll to nowhere---why? October 23, 2007, 11:38 pm
Can't get the menu horizontal July 1, 2008, 4:59 pm
Vertical and Horizontal Frames that Scroll Together October 7, 2004, 5:35 pm
Only Vertical Scroll bar no horizontal bars August 26, 2005, 3:44 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap