在中间显示按钮,在左侧显示文本
Display button in center and text at the left
遇到了一个我认为很微不足道的问题,但我无法解决。也许您找到了正确的解决方案。
我需要将按钮居中并在该按钮左侧显示文本。它应该是响应式的,所以带 position:absolute 的选项在这里不好。
还有其他解决方案吗?
我想要的视觉草图在这里
非常感谢您的任何建议。
这应该可以解决问题:
https://jsfiddle.net/waquwa47/
<div style="text-align: right;">
Text here
</div>
<div style="text-align: center;">
<button>
Button
</button>
</div>
<div>
</div>
div{
float: left;
width: 33.333%;
height: auto;
overflow: auto;
background-color: #FFF;
}
遇到了一个我认为很微不足道的问题,但我无法解决。也许您找到了正确的解决方案。
我需要将按钮居中并在该按钮左侧显示文本。它应该是响应式的,所以带 position:absolute 的选项在这里不好。 还有其他解决方案吗?
我想要的视觉草图在这里
非常感谢您的任何建议。
这应该可以解决问题:
https://jsfiddle.net/waquwa47/
<div style="text-align: right;">
Text here
</div>
<div style="text-align: center;">
<button>
Button
</button>
</div>
<div>
</div>
div{
float: left;
width: 33.333%;
height: auto;
overflow: auto;
background-color: #FFF;
}