I'm working on a website and I've noticed somthingwhenever page size is larger than the screen the scroll bar appears, and because the content is centered, the page gets kicked over. this is only in firefox because in IE 6 (unsure of 7) the scrollbar is always there. havnt tried other browsers yet, but I assume its the sameex: http://www.harmonyhounds.org/greyhound/lurecoursing.htmlhttp://www.harmonyhounds.org/greyhound/agility.html(the site isnt done yet)is there a way to compensate for this and still have the page centered? its not a big deal, but it caught my eye and now it bothers me a bit
8/18/2006 1:38:56 PM
Your page does stay centered. The trick is that when the scroll bar appears, the display area changes so your page is shifted to the center of the resized area. You could define your page to be a static distance from the left border, but that won't keep you centered because of differences in screen resolution and window sizes among your user base.
8/18/2006 1:55:09 PM
^thats what I meant, its still centered, but it doesnt look the same. the page jumps overas you said, everyone uses different resolutions. I made the center table 750px wide so it would look alright for thoes using 800x600, but centered it so it would look alright for thoes using higher. anchoring it to the side isnt ideala good 80 odd % of the people viewing the site will be using IE, given the numbers from my other site aimed at the same audienceso I guess its not that big of a dealmaybe what I'm looking for is a way to ask browsers like firefox to show a scrollbar, even if the page doesnt need one. is there a way to do this?[Edited on August 18, 2006 at 2:21 PM. Reason : add scroll]
8/18/2006 2:11:51 PM
what you are asking for would not be possible unless the webpage was aware of 1) how tall it is and 2) the viewable height of the browser window. So in that case, when the webpage became aware that it's height was greater than the viewable browser height, it would have to compensate and move the table to the right 15 or so px, or however wide the normal scroll bar is (which again is variable). Might be some javascript that could do that, but i don't think it would be worth it.
8/18/2006 2:19:57 PM
fixxed ithttp://www.communitymx.com/content/article.cfm?cid=528A0added just a bit of space to the bottom, which activates the scroll bar. no noticable change in ie, which is good
8/18/2006 2:33:08 PM
Try your page at 1600x1200 and higher resoultions to see if your "fix" worked.
8/18/2006 3:27:25 PM
^ eh. my native resolution is 1400 x 1050, tried 1600 x 1200 for the hell of it, looked shitty but seemed to work. should try other browsers later.. but again, most of the people who view this are going to use IE and my fix didnt impact it atall.. suppose I should get a copy of IE 7 to see if its any differentnot exactly a nice fix, but eh. it works
8/18/2006 4:48:10 PM