如何在使用grails时对齐gsp中某个部分的元素

问题描述 投票:0回答:1

我正在尝试在gsp中已存在的表的右侧显示图像。

下面是我的代码。

<body>
    <section>
            <div id=“image”></div>
            <section>
            <q:search/>
            <div class="table-responsive">
                <table class="table table-striped">
                </table>
            </div>
            </section>
      </section>
</body>

目前,图像div位于表格顶部。我需要它总是在桌子的右边。我该怎么做?。

最后终于成功了,我是这样做的。有更好的方法吗?。

<div style="clear:both; width:100%">

     <div style="margin-bottom: 30px;float:left;width:50%;">

     </div>

     <div style="float:left;max-width:30%;max-height:20%;margin-bottom:30px" >

     </div>
</div>
css grails alignment gsp
1个回答
0
投票

我是这样做的。有更好的方法吗?。

<div style="clear:both; width:100%">

     <div style="margin-bottom: 30px;float:left;width:50%;">

     </div>

     <div style="float:left;max-width:30%;max-height:20%;margin-bottom:30px" >

     </div>
</div>
© www.soinside.com 2019 - 2024. All rights reserved.