当前位置: 动力学知识库 > 问答 > 编程问答 >

HTML/CSS margin or padding problem

问题描述:

I am redesigning a website to better work with mobile devices. My problem is that on the right side of the page there is an open space, even though all the specified widths are the same. Here is the page: http://uniqueantiqueskingsport.com/wp7. So far I have only tested it with the Windows Phone 7 emulator.

网友答案:

I don't have a WP7 to test this on, but I'm seeing the same when viewing on desktop browsers. The problem is your footer content, a lot of it is set at width: 320px, margin: x and padding: x. Those margins are adding to the box model of your content, and forcing the page to expand.

Read up on the box model at Sitepoint's awesome reference site.

网友答案:

For the record, IE9 on Mango automatically zooms to fit the width of your content. But using a dynamic width would be much better.

分享给朋友:
您可能感兴趣的文章:
随机阅读: