gpt4 book ai didi

css - 无序列表不在 DIV 中居中。

转载 作者:行者123 更新时间:2023-11-28 13:31:41 25 4
gpt4 key购买 nike

在进行响应式设计时,我注意到除了无序列表之外的所有内容都是响应式的。当我调整浏览器大小时,列表不会移动或保持在其 DIV 中心。我一整天都尝试了很多东西,但就是想不通。对于上下文,#sitecontent 是包含所有内容的容器,#sitecontent .leftsidebar 包含图像和无序列表,#sitecontent .leftsidebar ul 是无序列表。有人可以检查一下并告诉我出了什么问题吗?请访问我的网站 http://www.tommaxwell.me并查看来源。

最佳答案

试试这个 CSS:

#sitecontent .leftsidebar ul {
position: relative;
top: -5px;
list-style-type: none;
font-family: 'Patua One', cursive;
padding-left: 10px;
}

#sitecontent .leftsidebar ul li {
margin-bottom: 3%;
clear: both;
border-bottom: 1px solid #E5E5E5;
font-family: helvetica;
text-align: center;
}

关于css - 无序列表不在 DIV 中居中。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13485890/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com