【发布时间】:2019-12-09 19:16:29
【问题描述】:
我正在尝试将页脚放在桌面上的一行并以移动设备为中心。但是,页脚上的图片左对齐,而不是在移动设备上居中。我想知道有关如何解决此问题的任何提示。 这是我目前拥有的网站代码:
软管似乎没有改变。任何提示表示赞赏
【问题讨论】:
标签: php css wordpress formatting
我正在尝试将页脚放在桌面上的一行并以移动设备为中心。但是,页脚上的图片左对齐,而不是在移动设备上居中。我想知道有关如何解决此问题的任何提示。 这是我目前拥有的网站代码:
软管似乎没有改变。任何提示表示赞赏
【问题讨论】:
标签: php css wordpress formatting
这是我在访问您的网站时运行的一些调整,并使其在浏览器中运行。
对于桌面 CSS:
.nonprofit {
font-weight: bold;
font-size: 15px;
color: white;
/* padding-left: 200px; */ // remove this
display: block;
align: right;
float: left; // Keep this in there
width: 50%; // Do this instead of width 100%
}
对于您的移动 CSS:
@media only screen and (max-width: 768px)
.nonprofit {
font-weight: bold;
font-size: 15px;
color: white;
display: inline;
padding: 10px;
/* float: left; */ // remove this
width: 100%; // add this
}
【讨论】: