Search code examples
jqueryjqtransform

jqtransform - set textbox width


I am using the jqtransform jquery plugin to change the look and feel of my form elements. However, I am unable to override the width of a text input element - no matter how I style the element it is overriden. Is there any known way to override this property?

Thanks in advance,

JP


Solution

  • Seems like the reasons are:

    1. Each form element has it's own wrapping div
    2. The width is hardcoded (by js) in style attribute, so overriding this in CSS doesn't work
    3. jqtransform does not provide element ids, so you have to set it manually somehow or operate with classes

    So, in your case I'd suggest you to use some jquery:

    var myW = 300;
    $("#elementId").css("width", myW);
    $("#elementId").parents(".jqTransformInputWrapper").css("width", myW);