Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.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 我正试图通过使用flexbox来导航到中心。_Css_Flexbox_Css Grid - Fatal编程技术网

Css 我正试图通过使用flexbox来导航到中心。

Css 我正试图通过使用flexbox来导航到中心。,css,flexbox,css-grid,Css,Flexbox,Css Grid,正如你在图片上看到的,当我把左边距:自动和右边距:自动放在一起时,logo aka moneyflow占据了一些空间。我希望导航准确地位于中心。谢谢你的帮助 `header { grid-column: full-start/full-end; display: flex; background-color: var(--color-blue-dark); .logo { margin-left: 5rem; align-self: center; color:

正如你在图片上看到的,当我把左边距:自动和右边距:自动放在一起时,logo aka moneyflow占据了一些空间。我希望导航准确地位于中心。谢谢你的帮助

`header {
 grid-column: full-start/full-end;
 display: flex;
 background-color: var(--color-blue-dark);
 .logo {
    margin-left: 5rem;
    align-self: center;
    color: rgb(209, 197, 197);
    font-size: 2rem;
}
.nav {
    margin-left: auto;
    margin-right: auto;
    align-self: center;
}`

您可以将flexbox用于导航项,将绝对定位用于徽标

*{
框大小:边框框;
}
img{
显示:块;
}
.集装箱{
背景色:黑色;
宽度:100%;
显示器:flex;
证明内容:中心;
对齐项目:居中;
位置:相对位置;
}
.标志{
位置:绝对位置;
排名:0;
左:0
}
.菜单{
显示器:flex;
}

左侧的徽标*