How do I set the width of a or dropdown list?

How do I set the width of a or dropdown list?

ekkerothekkeroth Posts: 19Questions: 6Answers: 0

Since being new to datatables and the editor I still try to find my way around the various options.

Hence this pretty basic question. I cannot find a css nor an option to specify the length, i.e. width of the dropdown and it shoots out of the editor window.

Perhaps someone can point me into the right direction. Thank you!

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Answer ✓

    Hi,

    The DOM structure that Editor uses is documented in the manual here, can be used to determine styling selectors.

    For example you might use:

    div.DTE_Field_Type_select select {
      width: 100%;
    }
    

    Allan

  • ekkerothekkeroth Posts: 19Questions: 6Answers: 0

    Dear Allan,
    Thank you for the instant responds.

    Adding your example to dataTables.editor.css does not work, it get's overwritten by other css with higher priority.

    But adding it to, for instance index.html, get's recognised and it works.

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    Good to hear that works. CSS selector priority can be a bit tricky! Including it in the file might just require adding something else to the selector to make it more specific.

    Allan

This discussion has been closed.