html - 在同一水平行中制作等宽的 DIV 标签?

标签 html css

getting both tag on same row but there size are not equal...

我想在同一行上同时制作宽度相同的 div 标签“添加更多元素”和“删除元素”...

 <div data-role="controlgroup" data-type="horizontal" class="ui-controlgroup ui-controlgroup-horizontal ui-corner-all" style="margin: 20px; width: auto">

            <div class="ui-btn ui-first-child"   style="   position: relative;  center; background-color: #36CD5A; color: #fff; text-shadow: none !important;"  data-inline="true" onclick="javascript:addNewItem()">Add More Item</div>

            <div class="ui-btn ui-last-child"  style="  position: relative; text-align: center; background-color: #36CD5A; color: #fff; text-shadow: none !important;"  onclick="javascript:removeAddedItem()">Remove Item</div>
        </div>

最佳答案

试试这个:

<div data-role="controlgroup" data-type="horizontal" class="ui-controlgroup ui-controlgroup-horizontal ui-corner-all" style="margin: 20px; width: auto;background-color:#36CD5A;">

    <div class="ui-btn ui-first-child" style="   position: relative;  center; color: #fff; text-shadow: none !important;display: inline;" data-inline="true" onclick="">Add More Item</div> |

    <div class="ui-btn ui-last-child" style="  position: relative; text-align: center;color: #fff; text-shadow: none !important;display: inline;" onclick="">Remove Item</div>
</div>

jsfiddle

关于html - 在同一水平行中制作等宽的 DIV 标签?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34739054/

相关文章:

html - 悬停一个元素时如何影响其他元素

css - CSS 中图像居中的分隔线?

javascript - 在下拉菜单顶部显示所选子页面的标题(wordpress)

html - 让 parent 超越 child

html - 为什么打印我的网页会使弹出窗口透明?

Android的浏览器兼容性

html - Ipad视口(viewport)肖像问题

jquery - 如何为我的 CSS 网格使用网格加载动画脚本 (GridLoaderFx)

javascript - Bootstrap Carousel 幻灯片会扰乱网站的元素和内容

javascript - 双像 slider 组合