vaadin-aligning元素

a11xaf1n  于 2021-07-12  发布在  Java
关注(0)|答案(1)|浏览(313)

我得到了一个csslayout,其中有三个元素像标签,标签和无边框按钮(x)像图标一样使用。我已经设置了setsizeundefined,我想有一个布局像:标签与额外的空间,因为标签的大小可以像0像素到200px的东西。然后我需要另一个标签,然后对齐最右边的删除按钮,如x。我真的做不到,讨厌。这应该也适用于移动设备,所以我认为固定尺寸不是个好主意。右浮动不适用于按钮图标。。。

<div class="v-csslayout v-layout v-widget">
    <div class="v-label v-widget uploadedRow-fileName v-label-uploadedRow-fileName v-label-undef-w">logo.jpg</div>
    <div class="v-label v-widget uploadedRow-description v-label-uploadedRow-description v-label-undef-w">Description1</div>
        <div style="width: 1px;" id="logo.jpg" class="v-button v-widget icon-only v-button-icon-only borderless v-button-borderless uploadedRow-deleteButton v-button-uploadedRow-deleteButton v-has-width" role="button" tabindex="0"><span class="v-button-wrap"><span class="v-icon FontAwesome"></span><span class="v-button-caption"></span></span></div>
   </div>

7gyucuyw

7gyucuyw1#

尝试在“关闭”按钮的右侧添加一个浮动。

<div style="width: 1px; float: right;" id="logo.jpg" class="v-button v-widget icon-only v-button-icon-only borderless v-button-borderless uploadedRow-deleteButton v-button-uploadedRow-deleteButton v-has-width" role="button" tabindex="0"><span class="v-button-wrap"><span class="v-icon FontAwesome"></span><span class="v-button-caption"></span></span></div>

相关问题