簡體   English   中英

如何使 WordPress 上的頁腳以移動設備為中心對齊,但在桌面和平板電腦視圖上對齊

[英]How to make a footer on WordPress align centered on mobile but on one line on desktop and tablet view

我試圖在桌面上的一行上制作我的頁腳,並以移動設備為中心。 但是,頁腳上的圖片在移動設備上向左對齊而不是居中。 我想知道有關如何解決此問題的任何提示。 這是我目前擁有的網站代碼:

軟管似乎沒有改變。 任何提示表示贊賞

這是我運行的一些調整,並在訪問您的網站時使其在瀏覽器中工作。

對於桌面 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
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM