为“正常”开发的网站尺寸的显示器在宽屏中变得混乱
我创建了一个网站,效果非常好,但后来去了一个朋友家,发现该网站不成比例,在他的宽屏显示器上几乎丑陋。如果不对网站进行大量重写,是否有一个脚本可以根据宽屏显示器或其他替代方案调整我的网站大小?除了“正确重做您的网站”之外,欢迎提出任何建议。谢谢!
编辑: 我的网站应如下所示: http://img843.imageshack.us/img843/4453/22425853.jpg
这是它在宽屏上的显示方式: http://img851.imageshack.us/img851/7494/racism.jpg
I created a website that works quite nice but later went over to a friend's house and the website was disproportioned and almost hideous on his widescreen monitor. Without extensive rewriting of the website, is there perhaps a script that resizes my website for those on widescreen monitors, or other alternatives? Any suggestions besides "redo your website properly" welcome. Thanks!
EDIT:
Here is how my website should look like:
http://img843.imageshack.us/img843/4453/22425853.jpg
Here's how it appears on widescreen:
http://img851.imageshack.us/img851/7494/racism.jpg
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这取决于你如何进行布局。如果您没有使用绝对或固定位置,最简单的方法可能是在内容周围使用包装 div 并为其指定最大宽度,就像这样
和 CSS
编辑:如果您没有访问权限对于 HTML,您可以保留如图所示的 CSS 并使用此 jQuery 行(它应该可以工作,但我还没有测试过)
编辑:我发现您不熟悉 jQuery。仅当页面准备好时才应运行的代码应按如下方式包装:
请告诉我这是否适合您。您可以尝试
在 Firebug 控制台中检查包装器 div 是否已创建。
It depends on how you did the layout. If you did not use absolute or fixed positiong, the simplest way could be to use a wrapper div around your content and give it a maximum width, like this
and the CSS
EDIT: If you do not have access to the HTML you can leave the CSS as shown and use this jQuery line (it should work but I have not tested it)
EDIT: I see you are not familiar with jQuery. Code that should be run only when the page is ready should be wrapped as follows:
Please let me know if that works for you. You can try
in the Firebug console to check that the wrapper div has been created.
在网站包装器的 CSS 中设置
max-width
。Set a
max-width
in your css on the wrapper of the site.