Centring an image on the visible part of the screen

I have been merging several CSS sheets and have two final queries before everything is complete.


The details above the table are centred, but is it possible to centre it within the visible screen ? So if the page is moved to the side the details above the table stays fixed in the middle of the screen ?

I can’t load that link.
But generally you can centre a block element by giving it a max-width and setting margin: 0 auto where 0 is the top/bottom and may have a value, auto is the side margins which will be equal, centring the block.

It is centred now. But as the table is bigger than the screen, the bit above the table is only partially visible,

Can it be set so so that it is always centred in the visible part of the screen

Your links are loading now.
I see what you mean now.
I think you would have to make just the table scrollable.

I know I could put in an I frame but don;t like the look of that

I think using an iframe would overcomplicate it. It would just need a container that fits the screen with overflow: scroll.
Using position: fixed would keep it fixed when scrolling vertically too.
It may be possible with some method of “sticky” positioning.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.