开发者

Webpage does not resize with browser window resize

A website I am developing for a client is having an odd issue. When the page is loaded, the page fills the whole browser 开发者_开发知识库window, but if the window is re-sized, the page stays its original dimensions with scroll-bars appearing, kind of like an overflow: hidden. I'm not sure why this is happening, here is the website: http://www.anthonygonzalez.com/


Your setStyle() function that's called when the body of your page loads is setting up the width, etc. statically (using pixels) based on the size of the browser window when the page is loaded. It doesn't appear to be updating those values when the window changes size. You either need to

  1. Use percentages instead of pixels when you do this or,
  2. Call that same function whenever the browser is resized to re-calculate those values based on the new window size.

Let me know if that doesn't help, or if I've missed something.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜