Hey guys,

got a problem to theme the dropdownlist. Can't add a margin-top to list because it`s hardcoded. Any help?

<ul style="display: block; top: 858.6px; left: 31px; width: 318px;" tabindex="0" id="ui-id-1" class="ui-autocomplete ui-front ui-menu ui-widget ui-widget-content"><li tabindex="-1" id="ui-id-3" class="ui-menu-item"><a><a href="/shop/floraprima"> <img src="/sites/default/files/logo/2353.gif" alt="FloraPrima" typeof="Image" class="img-responsive" height="40" width="120">

I use Drupal 8, see a issue like this for Drupal 6 but don´t help.

Thanks and regards,

Marvin

Comments

KiLLAH89 created an issue. See original summary.

vasike’s picture

Status: Active » Needs review

Unfortunately the autocomplete js restricts a little the styling there.

However, i think you could try use padding.
Probably the js won't consider the margin, as it could affect the position relative to the autocomplete textfield.

@KiLLAH89 Thank you and please feedback on this

vasike’s picture

Version: 8.x-1.1 » 8.x-1.x-dev

There is also other ways if you want to change the "HTML" of the suggestions: to Override the autocomplete.js
You could see "examples" in the JSs files used by this module
http://cgit.drupalcode.org/views_autocomplete_filters/tree/js

You could also check the commit for the an issue that do an Override of the autocomplete.js
#2852442-5: Autocomplete suggestion adds quotes to result
Please feedback

vasike’s picture

Assigned: KiLLAH89 » Unassigned
Status: Needs review » Fixed

I think we can close this, but feel free to re-open if there are more questions about.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.