Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/74.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,免责声明:我见过类似的帖子,但不是一个完全像我的,所以我现在发布 目前,我有以下几点: <div class="textwidget"> <p style="width: 69%;"> Yo, I'll tell you what I want, what I really really want, So tell me what you want, what you really really want, I'll tell you what I want, wha

免责声明:我见过类似的帖子,但不是一个完全像我的,所以我现在发布

目前,我有以下几点:

<div class="textwidget">
<p style="width: 69%;">
Yo, I'll tell you what I want, what I really really want, 
So tell me what you want, what you really really want, 
I'll tell you what I want, what I really really want, 
So tell me what you want, what you really really want, 
I wanna, I wanna, I wanna, I wanna, I wanna really really really wanna zigazig ha. 
If you want my future forget my past, 
If you wanna get with me better make it fast, 
Now don't go wasting my precious time, 
Get your act together we could be just fine 
I'll tell you what I want, what I really really want, 
So tell me what you want, what you really really want, 
I wanna, I wanna, I wanna, I wanna, I wanna really really really wanna zigazig ha. 
</p>
<a class="button overlay-btn" href="http://www.google.com" >A link</a></div>
我基本上希望/需要按钮高度一直向下延伸到与文本最后一行相同的底部。

有没有一个合理的方法来实现这一点?总是越简单越好。
我非常感谢您的帮助,因为作为一名CSS初学者,我已经尝试了一整天,但都没有成功。

以下是
显示:表格
解决方案-

您不需要HTML中的这个
style=“width:69%”“
。此外,您还可以将
垂直对齐:中间
显示:表格单元格
结合使用,因此请尝试将其与
文本对齐:中心
结合使用


UPD:-我觉得它看起来很不错。

你为什么不在同一个中加入你的主播呢?@RoboRobok刚刚做了,但没有真正改变任何事情。
.button, button, input[type="submit"] {
  background-color: #ff6600;
  font-family: "futura-pt";
  font-size: 30px;
  margin: 0;
  text-transform: lowercase;
}
.overlay-btn {
  position: absolute;
  width: 30%;
  right: 0;
  top: 0;
}
.button, button, input[type="submit"] {
  background-color: #ff6600;
  font-family: "futura-pt";
  font-size: 30px;
  margin: 0;
  text-transform: lowercase;
}
.textwidget {
  display: table;
}
.textwidget p {
  display: table-cell;
  width: 70%;
}
.overlay-btn {
  display: table-cell;
  width: 30%;
}