I am fairly new to the Web Development world. When I create a new site, most often as there will be a slight movement, right to left, or left to right of the page when switching from page to page.

I am using Dreamweaver CS4.

Any help would be appreciated

Recommended Answers

All 8 Replies

umm can you post a link to your site? or the code?

You sure its not the fact that one page may be longer than the height of the browser, so therefore a scrollbar is added to the right thus shifting the page slightly?

Yeah, it's the scroll bar that you have on every page except links and contact.
The only way to get around this is to either add a scroll bar on these pages using the overflow property in CSS or by adding additional content to these pages so a scroll bar shows up.

I didn't add a scroll bar to any page, at least not intentionally. Can you point me in the right direction here, please?

The scroll bar is something that is automatic and happens when you overflow the container. On every page except the links and contact page, your content does not overflow the container and therefore doesn't need the scroll bar to show up.

For the time being, you can add an empty div with a defined height on both of those pages so they are consistent. e.g.

<div style="width:100%; height:250px; background-color:transparent;">&nbsp;</div>

This would probably solve your issue on those two pages.

I prefer to add a global style rule to add a scroll bar to all pages. Less headache I think.

In your stylesheet add the following line:

html {
	overflow: scroll;

It works! My eternal gratitude... It is amazing what can happen when you know what you are doing, or can tap into someone who does.

I had this exact same thing happen to me when I first started out. Thats why I suggested it might be the scrollbar without seeing your code or page. I remember thinking "whats going on?" when I saw my page shifting over like you did.

Glad to help!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.