元素中的中心元素
Center element within element
有人可以帮帮我吗?本页的 link 为 http://margaridamoreira.com/welcome/。哪个 CSS 可以解决这个问题?
最好的,
伊沃
在 media=all
css 选择器
中对 ul
和 li
使用以下内容
.sharify-container ul{padding:0;margin: 0 auto;display: inline-block;width: 100%;height: 100%;text-align: center;}
.sharify-container li{list-style:none;height:50px;line-height:30px;float: none;margin:0;padding-left:2.5px;display: inline-block;}
使用 float:left
,您将所有 li
元素对齐到 ul
的左侧,这不是您想要的。
有人可以帮帮我吗?本页的 link 为 http://margaridamoreira.com/welcome/。哪个 CSS 可以解决这个问题?
最好的, 伊沃
在 media=all
css 选择器
ul
和 li
使用以下内容
.sharify-container ul{padding:0;margin: 0 auto;display: inline-block;width: 100%;height: 100%;text-align: center;}
.sharify-container li{list-style:none;height:50px;line-height:30px;float: none;margin:0;padding-left:2.5px;display: inline-block;}
使用 float:left
,您将所有 li
元素对齐到 ul
的左侧,这不是您想要的。