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
- Use percentages instead of pixels when you do this or,
- 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.
精彩评论