pages shift slightly

This is a discussion on "pages shift slightly" within the Web Page Design section. This forum, and the thread "pages shift slightly are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jan 25th, 2007, 20:16
New Member
Join Date: Jan 2007
Location: alberta
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
pages shift slightly

My site (http://www.calgarybridge.com/PRACTICE/) is finished and ready to replace http://www.calgarybridge.com but one thing is bothering me.
Everything is inside a div.container and is centered on the page. If I give the container a height of "auto" some of the pages will shift to the right slightly when loaded. I can see this in Netscape, Firefox and Opera. It happens when the centre div changes from having a bit of information to a lot.
I can fix this by specifying a height of 840 pixels but this gives me scroll bars even when they are not needed.
The original site has a fixed height and handles the changes well but I really would like to fix it the proper way. I just do not know how.
Thanks for any replies in advance.
Reply With Quote

  #2 (permalink)  
Old Jan 25th, 2007, 21:52
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: pages shift slightly

It's because of the scrollbars appearing on the page It seems obvious when you think about it, but this one stumped me for a while too. You can get around this by forcing the scrollbars to appear at all times with this little bit of code. Bear in mind it may cause adverse effects in some browsers depending on the site, but for the most part, it should do the trick.

Code: Select all
html, body {
    height: 100%;
    margin: 0 0 1px;
}
Reply With Quote
  #3 (permalink)  
Old Jan 25th, 2007, 22:11
New Member
Join Date: Jan 2007
Location: alberta
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: pages shift slightly

Thanks for your response. I read something similar on another Forum. The code I used worked in netscape and firefox but not opera.
html {
min-height:100.1%;
}
Reply With Quote
  #4 (permalink)  
Old Jan 25th, 2007, 23:40
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: pages shift slightly

Yes, mine is better. It works in IE and Opera, and that code won't.
Reply With Quote
  #5 (permalink)  
Old Jan 26th, 2007, 00:53
New Member
Join Date: Jan 2007
Location: alberta
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: pages shift slightly

Thanks Ryan. You were close. It did not work in Opera until I made a slight change in your code
html, body {
height: 100.1%;
margin: 0 0 1px;
}

Thanks again I am very pleased to solve this
Reply With Quote
  #6 (permalink)  
Old Jan 26th, 2007, 02:53
New Member
Join Date: Jan 2007
Location: alberta
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: pages shift slightly

html, body {
height: 100.1%;
margin: 0 0 1px;
}
I also changed the height on the div.container to "auto"

This fixed the scroll bar problem in all browsers but gave me another problem
On my a-z photo pages and my Unit Board page (all have photos) , half of my header would disappear and the backgrounds to my menus would go also. There was a white oblong obscuring it.
I had to use a slightly different Style sheet with the height set to 840px and with none of the other extra code above included.
Frustrating.


The code on any of the a-z photo pages is the original css(photo.css) while the layers.css on other pages is the changed one you recommended. The problem was not with just IE. All the browsers were screwing up the pages. here is a link to a page to show you what I mean http://www.calgarybridge.com/PRACTICE/problem.htm
Something is conflicting with the new info . maybe I have been looking at it too long to see the problem

This problem shows up in the other 3 browsers but not IE 6 OR 7

Last edited by mufc; Jan 26th, 2007 at 13:50.
Reply With Quote
  #7 (permalink)  
Old Jan 26th, 2007, 15:19
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,993
Blog Entries: 1
Thanks: 0
Thanked 32 Times in 32 Posts
Re: pages shift slightly

Safari used to have this issue with the scroll bar shifting it a bit left as it displayed inside the window. A weird and annoying issue indeed. Caused many people a headache or two.
__________________
I hate IE 6. Just sayin....
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
Reply

Tags
height auto problems

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
postion slightly out on IE and FF wood1e Web Page Design 4 Sep 23rd, 2007 06:51
iframe's: slightly complex, need help deymeraff Web Page Design 0 Jun 8th, 2007 04:02
Slightly embarassing forms question:-) Michaeln Web Page Design 3 Feb 19th, 2007 14:01
Moving table to left slightly jj1234 Web Page Design 4 Mar 13th, 2006 15:50
Slightly Pixilated/Blurry Flyer kahlie Graphics and 3D 7 Dec 9th, 2005 22:47


All times are GMT. The time now is 23:54.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43