[div缩小时移动div

问题描述 投票:1回答:1

我的页脚div元素在缩小时会向右移动。它应该像图片中的那样,带有蓝色字母。我需要它才能在更大的屏幕上使用the problem`

        <div>
        <p class="">&copy; 2020 Pizza. All Rights Reserved</p>
        </div>`

这是CSS

footer div {
color: #0c648f;
font-size: 14px;
background-color: #f2f4f5;
padding: 1px 0;
margin-top: 10px;

}

footer p {
text-align: right;

}

html zoom
1个回答
1
投票

是否认为它应该与页面内容右对齐?如果是这样,则需要在max-width样式上使用footer p,以便内容将与该空间的右边而不是整页的右边对齐。您还需要将该元素居中(使用margin: auto)。

© www.soinside.com 2019 - 2024. All rights reserved.