Styling the input element itself on an Editor form (not the wrapper div)?

Styling the input element itself on an Editor form (not the wrapper div)?

iain_mciain_mc Posts: 15Questions: 0Answers: 0
edited February 2013 in Editor
I have a dropdown containing very wide content which I want to limit to 100% of the width of the parent div (which I can style with "className" or by changing the DTE_Field_Input definition). Unfortunately it just runs over the edge.

Is there some way I can style the actual input element to force the same width for textboxes, dropdowns etc. on the Editor Form?

I have just downloaded 1.2.3 and tried the following:

[code]
fields: [
{ label: "Author:",
name: "author_id",
type: "select",
attr: { "width":"200px" },

[/code]

To no obvious effect, but I'm probably doing it wrong.

Thanks!

Iain

Replies

  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    `px` is a CSS unit of measurement - try just `width:200` . However, you might also want to do it via CSS:

    [code]
    div.DTE_Field_Type_select select {
    width: 200px;
    }
    [/code]

    It is worth saying that select elements are notoriously difficult to style in web-browsers, particularly when they have overflowing content! You might find different browsers behave in different ways.

    Allan
  • iain_mciain_mc Posts: 15Questions: 0Answers: 0
    Ah ha, thanks Allan, I'll give those a try!
This discussion has been closed.