Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Search element (dropdown element, 100% width on the input it self)


We do use a input field with a search element of Metronic Theme 8. Vue.


<input type="text" class="form-control form-control-lg form-control-solid px-15" name="search" placeholder="Search" data-kt-search-element="input">

<div class="menu menu-sub menu-sub-dropdown menu-column p-7 w-325px w-md-375px show" data-kt-menu="true" id="kt-search-menu" data-popper-placement="bottom-end"></div>


Now you can set the width by: w-325px and w-md-375px. What we want to achieve is that the menu dropdown, should always 100% (same width) as the input field. Check the attachment what we want to achieve. Important, that this will work on each device.

<img src=" />


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (2)


Hi,

The dropdown element is a separate element that does not depend on the input width so the input width and dropdown width should be set separately. As a workaround you should set the input width equal to the dropdown with.

Regards.



Can't edit my answer (looks like a bug). Please check attachment:


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(