1 reply [Last post]
mufc
Offline
newbie
Last seen: 14 years 2 days ago
Joined: 2007-01-25
Posts: 1
Points: 0

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.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 2 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

One of those facts of life

One of those facts of life I'm afraid, you've mentioned the problem ,look again and watch the scrollbars appear when content exceeds viewport height and then look at a page with shorter content where no scrollbar appears but look in IE, you'll notice that it still reserves the space for the scrollbar but just greyed out(inactive) usually people force a height on the html element with margin or padding to cause a permanent scrollbar.

This is an area where IE has got it right, scrollbar is a necessity, far better that it occupies it's space all the time and is not part of the viewport/canvas as such.

However I can't see any pages that have short content to demonstrate the problem!

btw mailto: links are really annoying.

:mad: had a funny feeling you were a cross forum poster, don't make a habit of it as it's bad form.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me