简体   繁体   English

网站内容被切断和布局问题

[英]Site content being cut off and layout issues

First I'll say I've been lurking for quite some time on all the StackExchange sites, and now I've run into my first issue that I'm having trouble getting around. 首先,我会说我已经在所有StackExchange网站上潜伏了一段时间,现在我遇到了我遇到的第一个问题。

I'm working on a live site - Beautiful & Abundant - and everything is working as it should on my desktop and tablet, however when I pull it up on my mobile (Samsung Galaxy S3) it gets all kinds of screwy. 我正在一个真实的网站上工作- 美丽和充裕 -一切都可以在我的台式机和平板电脑上正常运行,但是当我将其放在手机(三星Galaxy S3)上时,会遇到各种麻烦。

Screenshots show landing as viewed on my phone. 屏幕截图显示了在手机上看到的着陆情况。 Just fine (albeit some crappy troubleshooting layout). 很好(尽管有一些糟糕的故障排除布局)。 The second image shows the sidebar extended out and that's the first area of puke. 第二张图片显示侧边栏伸出,这是呕吐的第一个区域。 The sidebar is 235px wide and my phone has a display resolution of 360px wide. 边栏为235px宽,我的手机的显示分辨率为360px宽。 Doing some simple math, the sidebar should occupy 65.27 (repeating of course) percent of my screen. 做一些简单的数学运算,侧边栏应该占我屏幕的65.27(当然是重复的)百分比。 Unfortunately (as seen in the image) its only taking up about a third of the screen, not to mention the text is much smaller than I've set it to be. 不幸的是(如图所示),它仅占据了屏幕的三分之一,更不用说文本比我设定的要小得多了。

The second area of concern (and most important) is the content being cut off on mobile. 关注的第二个领域(也是最重要的)是移动设备上的内容已被切断。 As seen in the third screenshot, it all just abruptly ends. 如第三个屏幕截图所示,这一切都突然结束了。 I don't get it. 我不明白 I've never had this issue before. 我以前从未遇到过这个问题。

The site is built on WordPress, however I don't think it's a WP issue specifically, which is why I'm posting here instead of on WordPress answers. 该网站是基于WordPress构建的,但是我不认为这是特定的WP问题,这就是为什么我在这里发布而不是在WordPress答案上。 If I should post there, please let me know and I'll be more than happy to move it. 如果我要张贴在那儿,请让我知道,我很乐意将其移动。

I normally just work on something over and over again until I magically stumble upon a resolution, however I'm hoping to learn more about this collaboration thing I hear everybody talking about. 我通常会一遍又一遍地做一些事情,直到我迷迷糊糊地找到一个解决方案为止,但是我希望能更多地了解到我听到的每个人都在谈论的协作内容。

Thanks in advance everybody/anybody that offers assistance. 在此先感谢提供帮助的所有人。 I'm gonna go see if I can help anybody else while I eagerly await feedback! 我要去看看我在热切等待反馈的同时是否可以帮助其他任何人!

EDIT 编辑

Thanks to @theftprevention, the sidebar and such is behaving properly, but I'm still getting the issue of content being cutoff on my phone. 感谢@theftprevention,侧边栏等的行为正常,但是我仍然遇到手机内容中断的问题。 I'm going to see if anybody else around me has the same issue. 我要看看周围的人是否也有同样的问题。

The site's responsiveness works fine when I resize the window in my browser, but you're right about the mobile site looking weird, and I think I know why. 当我在浏览器中调整窗口大小时,该站点的响应能力很好,但是您对移动站点看起来很奇怪是正确的,我想我知道为什么。

If you have access to the page's raw HTML, then consider the following lines (lines 7 and 8 in the source of your homepage): 如果您有权访问页面的原始HTML,请考虑以下几行(主页源代码中的第7和8行):

<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
<meta name="viewport" content="width=device-width" />

Replace both of those lines with the following: 将这两行替换为以下内容:

<meta name="HandheldFriendly" content="true" />
<meta name="viewport" content="width=device-width, height=device-height, user-scalable=no" />

This should fix the way in which mobile & tablet browsers handle the scaling of your content. 这应该可以解决移动和平板电脑浏览器处理内容扩展的方式。 I couldn't reproduce the cutoff problem in your third screenshot on my phone, but these meta tags may very well fix that too. 我无法在手机的第三个屏幕截图中重现截断问题,但是这些meta标签也可以很好地解决该问题。

Finally, you have not one , but two very large uncompressed images; 最后,您没有一个 ,但是有两个非常大的未压缩图像。 they're 1.6 MB and 3.4 MB, respectively. 它们分别是1.6 MB和3.4 MB。 You might consider using GIMP or something to scale them down and use proper JPEG compression when re-saving them. 您可能会考虑使用GIMP或其他东西来缩小它们,并在重新保存它们时使用适当的JPEG压缩。

Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM