Display Images#

Warning#

Warning

Sphinx Carousel

At some stage the sphinx carousel worked, but using the latest versions of programs, there is a general failure - KeyError: 'classes' in sphinx.search. Apparently the problem is still outstanding 12 March 2025 to 12 August 2025.

Pure CSS Horizontal Scrolling#

This is a workaround in HTML. It avoids the dangers of a carousel - equally there are Cassandras who say that the average punter cannot deal with horizontal scrolling as they are only used to vertical scrolling - there are an increasing number of websites using horizontal scrolling and winning awards.

Horizontal scrolling can be controlled with Javascript but it suffers because it has to control the scrolling in a system hungry fashion - if we can do it purely in CSS the browser can make it happen without anymore resources than for an ordinary scroll.

First we have to fool the browser into thinking it is scrolling vertically when in fact it is scrolling horizontally. To enable scrolling the content must overflow the user window. The effect is heightened if the scrollbar, which would be normally displayed, is switched off, but scrolling is enabled.

Assume the images will be displayed inside a rectangular container, long sides vertical, which will be rotated through 90°. As the container is turned its sides will move relative to their original position. Rotate about one of the upper corners so that the container's long side is now horizontal at the same level as the upper corner. If we rotate anticlockwise (-90°) and use the top right corner, then the upper side will be the same distance away from the top margin as a short side used to be. The short side closest to the left hand margin will now be further away than the long side used to be by an amount equal to the width of the container.

The container will normally end up being too far from the left hand margin, which will require moving the container sideways (translate), make the translation first and remember to use a minus Y for a minus X translation.

Meanwhile the childen (images) have also been rotated as they sit in the container. They will need to be rotated - this time clockwise 90°.