【发布时间】:2021-09-04 15:17:03
【问题描述】:
这里有聪明人,谁能明白我为什么不能对齐我的按钮? 我已经尝试了 2 天了,但我仍然不知道怎么了... 我尝试过 Items-aligned,但它缩短了我似乎无法更改的按钮的宽度...
<style id="remote-buttons">
:root {
--dashboard-unit-width: 48px;
--dashboard-unit-height: 48px;
}
.nr-dashboard-template {
padding: 0px;
}
.remote-button:not([disabled]):hover{
background-color: #4CAF50 !important;
}
/* This is the normal button definition */
.remote-button{
background-color: MediumSeaGreen !important;
color: #FFFFFF !important;
height: var(--dashboard-unit-height);
width: 100%;
border-radius: 10px;
font-size:1.0em;
font-weight:normal;
margin: 0;
min-height: 36px;
min-width: unset;
line-height: unset;
}
【问题讨论】:
-
你能创建一个最小可重现的例子吗?包括html和css?因为没有它,没有人能帮助你。使按钮居中通常非常简单。给出的解决方案都没有失败的原因是您没有提供导致问题的部分。
标签: java html css dashboard node-red