Why is Browser Window so Large -- How To Set w/o Javascript?

I'm customizing the theme Zenpage to create a relatively compact website (less than 900px wide). Regardless of setting CSS width and max-width values on the html and/or body tags, the browser window ends up being nearly twice that width, with horizontal scroll bar. Colorbox is being loaded, as well as Jquery. I wonder if there may be some Jscript somewhere that's resizing the browser window arbitrarily?

My question: where is the size of the browser window set, and is it possible to enforce a max-width: limit on the html or body tag so the browser window does not exceed that limit?

Thanks in advance for any clues.

Comments

  • acrylian Administrator, Developer
    Nothing is resized via JS and especially not the "browser window" (generally considered very bad practice). You probably have a conflict in your CSS changes. Sorry, you will have to figure those out yourself as the original theme does not do this.
  • Thanks for ruling out Javascript as the culprit, this saved me a lot of time, and I appreciate the prompt reply.

    Indeed, in modifying the zenpage theme, I must have introduced some sort of anomaly which caused the expansion of the browser window to almost twice the proper size.

    I did set the html tag to a max-width of 900px in the header section of pages.php, as well as in every reference to <html> or <body> in style.css. Since all my other property assignments to the <html> tag appeared to be working properly, I remain mystified as to how that property could have been overridden. I also noticed that on a test platform where I have an instance of IE version 6, the browser window did not expand. (In all later versions of IE, as in Firefox, I saw the same problem.)

    Having now upgraded to Zen-1.4.4.3, I plan to retrace my steps modifying the Zenpage theme, and see if I can figure out what caused this.

    Thanks again for your assistance.
  • acrylian Administrator, Developer
    Well, IE6 is really nothing you should test on or use at all these days, unless you really must. That browser is really ancent and we really make no efforts to make anything work for it.
    Sorry.

    Sometimes such window issue are caused by one element being set to wide or with too much margin/padding somewhere so it exceeds its parents sometime.

    I would suggest to use Firefox and for example the webdeveloper toolbar or firebug plugin. That can make the elements visible on a site and help find out.
Sign In or Register to comment.