Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.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
Html 垂直对齐:居中右侧;作品_Html_Css - Fatal编程技术网

Html 垂直对齐:居中右侧;作品

Html 垂直对齐:居中右侧;作品,html,css,Html,Css,我想让图像垂直对齐在右边 .header { background-color:white; width:auto; height:120px; } .title { vertical-align:center-right; } <div class="header"> <div class="title"> <a href="home.html">

我想让图像垂直对齐在右边

.header {   
    background-color:white;
    width:auto;
    height:120px;
}

.title {
    vertical-align:center-right;    
}

<div class="header">
          <div class="title">

                    <a href="home.html"><img src="logo.png"/></a>

          </div><!--TITEL DIV-->
     </div><!--HEADER DIV-->
.header{
背景色:白色;
宽度:自动;
高度:120px;
}
.头衔{
垂直对齐:右中对齐;
}

但是“title”div中的内容不会在右中心垂直对齐。

文本对齐不是垂直对齐。。。它用于文本水平对齐,只能有三个值中的一个:左、右和中。请共享您的HTML和CSS代码,并明确您想要实现的目标???
text align
仅为水平对齐。您需要使用
垂直对齐
@LuudvanKeulen而不是working@Bayern什么不起作用?如果你想使用垂直对齐,你需要确保div是全高。Right可以工作,但保持在topuse
行高
我认为它可以工作到顶部:D
.title{
    vertical-align: middle;
    text-align: right;
}