[Vuejs]-Two div button position top and bottom how to let them position to left and right

1👍

Wrap them in a parent div (I can see you have one already) and add a style of display: flex; you can also add a style of justify-content: center; to keep the elements centered on the page.

Code:

<div class="dropdowns" style="display: flex; justify-content:center;">
    <VDropdown :triggers="['hover', 'focus']" placement="top-start">
      <button>Test</button>
      <template #popper>
        <div style="padding: 1rem">Help Me</div>
      </template>
    </VDropdown>
    <VDropdown :triggers="['hover', 'focus']">
      <button>Test 2</button>
      <template #popper>
        <div style="padding: 1rem">Hello t2</div>
      </template>
    </VDropdown>
</div>

I hope this helps!

Leave a comment