How do I change field width

How do I change field width

drahcir77drahcir77 Posts: 7Questions: 2Answers: 0

I used generator to make a database Editor, I have read the directions but I still don't understand. How do I change the width of a field ?

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Hi,

    You could use something like this in your CSS:

    div.DTE_Field input { width: ...; }
    

    Allan

  • drahcir77drahcir77 Posts: 7Questions: 2Answers: 0

    I looked in the css files and I don't see where I can just make one column larger. it is the 5th column of the data.

    what should I look for ?

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Oh I see - this is in the DataTable and not the Editor fields?

    What I would suggest in that case is using the columns.className option to assign a class name to the cells in a column. Then in the CSS add a rule to work with whatever class name you select: td.myClass { width: 25% } for example.

    Allan

  • drahcir77drahcir77 Posts: 7Questions: 2Answers: 0

    I have been trying to find where I change the option's. I am very new but a quick learner once I get a feel for what is what.

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    There are a column of examples in the columns.className documentation. Also have a read through the manual section on options.

    Allan

  • drahcir77drahcir77 Posts: 7Questions: 2Answers: 0

    Ok, I am still not making myself clear. I understand the code. But where do I put this code. I have tried a number of places and it has not worked for me. Do I put the code into the table.cmsdata.js or the php file (I don't think so but had to include the choice, or as a script in the html file. I have tried both the .js and .html and nothing happens.

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    But where do I put this code.

    Which code are you talking about?

  • drahcir77drahcir77 Posts: 7Questions: 2Answers: 0

    the columns.className etc. When I read the examples I think I see js code. But I have tried to make it work with no joy. just need to know where to place the code from the examples and I will be on my way

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    Answer ✓

    That goes in your DataTables initialization script. Allan gave you links to the relevant documentation.

  • drahcir77drahcir77 Posts: 7Questions: 2Answers: 0

    thank you

This discussion has been closed.