Horizontal scrollbar bug solved

This is the place to share H&M templates and utilities with other users. Topic templates can be posted as text attachments (*.txt) or in the posting itself between

Code: Select all

 and 
tags. Print manual templates (*.mnl) are digital and can only be posted as attachments. Utilities and multiple files can be posted in ZIP archives. Please include plenty of comments so that users understand what you're doing! Registration is required to access this forum.

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Horizontal scrollbar bug solved

Unread post by Tim Green »

While working on the new universal non-scrolling header template I stumbled on the solution for the horizontal scrollbar bug. The cause and the solution are so simple that it is almost embarrassing. All that is needed is a width: 100%; setting in the DIV around the topic text variable. If you add that the problem disappears and you can then use any kind of table width setting without triggering the bug in MSIE or HTML Help. It seems that the MSIE parser can't calculate percentage widths properly without an explicit declaration of the width in this location. It also works fine in other browsers with this setting.

So now you can make text break at the window border even when graphics or tables on the same page extend beyond the border by replacing this in the standard template:

Code: Select all

<table width="100%" border="0" cellspacing="0" cellpadding="5"><tr valign="top"><td align="left">
<%TOPIC_TEXT%>
</td></tr></table>
With this:

Code: Select all

<div style="padding: 10px 10px 10px 5px; width: 100%;">
<%TOPIC_TEXT%>
</div>
Note that the values for the padding go clockwise around the page from the top, so the values are Top Right Bottom Left. If you want to set the same values for Top/Bottom and Right/Left you can just enter two values (ie. padding: 10px 20px;)
Last edited by Tim Green on Sat Aug 05, 2006 9:38 am, edited 1 time in total.
Jonathan S
Posts: 163
Joined: Mon Oct 03, 2005 5:58 pm

Unread post by Jonathan S »

Tim, thanks for this. It makes quite a few of my topics look a lot better!
User avatar
Dean Whitlock
Posts: 577
Joined: Thu Sep 01, 2005 5:59 pm
Location: Thetford Center, Vermont USA
Contact:

Unread post by Dean Whitlock »

Tim,

Is this change needed for the new non-scrolling template also, or is the problem dealt with differently there? The July 8 version looks a little different from what you show here (in the Topic content area, that is - it's very different everywhere, of course). The width=100% statement seems to be absent.

Thanks,
Dean
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Unread post by Tim Green »

Dean,

This is handled elsewhere in the new non-scrolling header style, it's already taken care of there.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply