|
javascript problem in safari
Hi
we have recently designed and built a dynamic web site using DIV element within another, to enable the user to scroll.
When we had the site tested we received this feed back;-
3. The scrolling pane does not scroll far enough in Apple Safari, so in several cases it is not possible to view all the books.
We have identified the cause, and have found a solution, albeit that it is not ideal.
? The scrolling pane is constructed from a DIV element inside another one. The outer one is 600 pixels wide, and sets the width of the display the user sees. The inner DIV element is currently 1682 pixels wide on every page, and this determines the width of the table containing the thumbnail ima This means it is possible to scroll until no books are visible. If the user continues to scroll before changing direction it may take some time before any books come back into view.
? There is a ‘grey area’ during which increases in the ‘width’ attribute of the DIV element causes the spacing between the books to increase.
If the DIV width is below the lower limit of this ‘grey area’ then Safari does not display all the books.
As the DIV width increases, the spacing between the books increases, and becomes unacceptably large.
If the DIV width is above the upper limit of this ‘grey area’ then it is possible to scroll until no books are visible.
The solution is to set the DIV width to the exact value required, which is different for each page and depends on the number of books in the scrolling pane. It will be in the ‘grey area’ described above, probably near the lower limit. It may be that this can be calculated if all books are the same width. If not, it will be necessary to use trial and error.
This solution will obviously cause a maintenance issue if books are added to or removed from the pages. It is recommended that alternative coding methods are investigated, possibly using JavaScript to set the width of the DIV element automatically based on the number of books on each page.
If anyone could help us please could you
|