简体   繁体   English

需要在移动设备上制作单个帖子页面容器全宽

[英]Need to make single posts page container full width on mobile ony

I picked Kadence theme for my blog and so far i'm loving it but currently i'm facing a problem when editing the single posts page.我为我的博客选择了 Kadence 主题,到目前为止我很喜欢它,但目前我在编辑单个帖子页面时遇到了问题。

I want to have "boxed" content style on desktop which looks better than full width in several smaller screen computers and full width content style on mobile only.我想在桌面上使用“盒装”内容样式,这在几台较小屏幕的计算机上看起来比全宽更好,而仅在移动设备上使用全宽内容样式。

The theme's default editor only gives me the option to switch to either one, it's not possible to choose a different setting for each device.主题的默认编辑器只给我切换到其中一个的选项,不可能为每个设备选择不同的设置。

When browsing on mobile with the "boxed" content style there's a huge margin which makes the content appear too narrow, this is fixed when setting content style to "full width".当使用“盒装”内容样式在移动设备上浏览时,会出现巨大的边距,这会使内容显得太窄,这在将内容样式设置为“全宽”时已修复。 But with this option selected the desktop version's content is way too wide for some smaller computer screens.但是选择这个选项后,桌面版本的内容对于一些较小的计算机屏幕来说太宽了。

I've tried using "additional css" in the customizing options present in my theme and put some code I found after a quick browsing session but so far nothing worked as intended.我已经尝试在我的主题中的自定义选项中使用“附加 css”,并放置了一些我在快速浏览 session 后找到的代码,但到目前为止没有任何效果。

Any sort of help with this will be appreciated.任何形式的帮助将不胜感激。

Thanks in advance.提前致谢。

you can use media query css with single post type class.您可以将媒体查询 css 与单个帖子类型 class 结合使用。

@media only screen and (max-width: 767px) { .single-post target-class { //CSS code }}

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

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