CSS & Web Design Forum  

Welcome to the CSS & Web Design Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
WM Media Banner

Supporters
Pos Software - POS hardware and Software to track, control and manage your inventory.
Web Templates - BoxedArt is the most reliable source for unlimited template downloads.
Check out boston web design right now!

Social Bookmarking
WL Marketing - Your #1 source for building links

Go Back   CSS & Web Design Forum > Web Design > HTML & XHTML
Reply
 
Thread Tools Search this Thread Display Modes
(#1)
Old
Jason
Guest
 
Default prevent horizontal scrolling - 02-06-2008, 02:51 AM

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 width="100%"> but that doesn't prevent the problem.
Reply With Quote
(#2)
Old
Ben C
Guest
 
Default Re: prevent horizontal scrolling - 02-06-2008, 07:28 AM

On 2008-02-06, Jason 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 > 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.
Reply With Quote
(#3)
Old
Ed Jay
Guest
 
Default Re: prevent horizontal scrolling - 02-06-2008, 01:28 PM

Ben C scribed:

>On 2008-02-06, Jason 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 >> 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)
Reply With Quote
(#4)
Old
Ben C
Guest
 
Default Re: prevent horizontal scrolling - 02-06-2008, 02:48 PM

On 2008-02-06, Ed Jay wrote:
> Ben C scribed:
>
>>On 2008-02-06, Jason 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 >>> 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



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).
Reply With Quote
(#5)
Old
David E. Ross
Guest
 
Default Re: prevent horizontal scrolling - 02-06-2008, 05:29 PM

On 2/6/2008 6:02 AM, Ed Jay wrote:
> Ben C scribed:
>
>> On 2008-02-06, Jason 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 >>> 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


Have you been using Netscape and now feel abandoned by AOL?
Then use SeaMonkey. Go to .
Reply With Quote
(#6)
Old
Ed Jay
Guest
 
Default Re: prevent horizontal scrolling - 02-06-2008, 05:46 PM

David E. Ross scribed:

>On 2/6/2008 6:02 AM, Ed Jay wrote:
>> Ben C scribed:
>>
>>> On 2008-02-06, Jason 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 >>>> 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.


You could change it from 1100 to 800, or whatever you want. That said, the
other fella who posted was correct...my technique won't stop someone from
typing 'width:2000px' and defeating the purpose of max-width.
>
>Many people still prefer ASCII-formatted E-mail. Some even trash any
>HTML-formatted messages.


People stubbornly do a lot of foolish things...trashing HTML emails without
bothering to note the sender is only one example.
--
Ed Jay (remove 'M' to respond by email)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Hosting at Triple.com
vBulletin Skin developed by: vBStyles.com