No replies
Chris..S's picture
Last seen: 10 years 26 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

I am working on a site for my cricket club. The banner calls for graphics placed relative to the right hand margin. Some pages aren't as long as others and may be displayed without a vertical scrollbar.

Moving from a page that doesn't require a vertical scrollbar to one that does (or vice versa) causes a jog in the position of the graphics located on the right hand side of the page.

Is there any way to construct the page so the vertical scrollbar appears inside the right hand page boundary?
(thus any element positioned relative to the right hand side is not moved by the appearance of a vertical scrollbar)

The site can be found here

Its easiest to see the effect by viewing this page and altering the viewport size to force the appearance/disappearance of the vertical scrollbar.

I realise I can set body {overflow:scroll;} to ensure a scrollbar always appears - and hence can not disappear disrupting the banner graphics. Is there any other way?