Viewport moving from right to left

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Renzy's picture

Hi there,

I have just about finished building my first very basic theme for a client using Zen sub-theme. I have used the fixed width layout with a 3 column design. I have a problem where the viewport, or entire page width is moving slightly from right to left, or left to right. It appears to be dependent on the length of the page, with navigating between the shorter pages, that do not require a scroll, it is not happening. However move from a page with long content, to a shorter one, then the movement is noticeable.

I am wondering if anyone else has had this issue, and may be able to point me in the right direction as to what to fix in my css. (no changes to page.tpl.php have been made, well just one tiny one in the footer).

Thanks is you can assist.
Renaee

Comments

forgot to give site url!

I think you answered your

Garrett Albright's picture

I think you answered your own question. When a web browser is drawing a page and it finds the page is long enough that scrolling will be necessary, it adds a scroll bar. But adding that scroll bar means there's now sixteen pixels or so (depending on your operating system) less horizontal space to work with, so it has to shift things around a bit horizontally to adjust for this lack of space.

There's not really anything practical you can do about it. There's some impractical things - make sure all of your pages scroll, or don't scroll - but please avoid them for everyone's sake.

By the way, I'm from northern California… What's up with associating those little toothpicks on your site with "redwoods?" Real redwoods look like this.

thanks!

Renzy's picture

Hi there Garret,

Something so obvious as that, that I overlooked it. And I had a look round on other fixed width sites, and saw they were all doing the same.

As for the redwoods, I blame the designer!! I said to her that we could easily get some shots of some real redwoods. The trees there are Australian gum trees mostly (got rid of the silver birch which are indeed toothpicks) But the client wanted to use her own photos so that is the reason.

Many thanks,
Renaee.