Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 元素中的中心元素_Css_Center - Fatal编程技术网

Css 元素中的中心元素

Css 元素中的中心元素,css,center,Css,Center,我试图将此元素集中在这里: 有人能帮我吗?此页面的链接为。哪个CSS可以解决这个问题 最好的, Ivo在media=allcss选择器中对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;lin

我试图将此元素集中在这里:

有人能帮我吗?此页面的链接为。哪个CSS可以解决这个问题

最好的,
Ivo

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
的左侧,这不是您想要的

你的HTML进入了问题。将其分离、重新编程,然后添加到一个容器中。