You must Sign In to post a response.
  • Category: JQuery

    How to change width of td using jquery

    Hi,

    In my application ,i want display 2 buttons in a td horizondally.

    but it is displaying one below other. the td is rendered as follows

    <td class="109" >
    <input value="Edit" id="edit" type="button">

    <input value="Cancel" id="cancel" type="button">
    </td>

    i tried to change the width as 140px

    like

    $('.109').width("120px");

    but it is not working.

    my requirement is to display 2 buttons horizondally in the td

    how to solve this

    regards

    Baiju
  • #769323
    Hi Baiju

    Please check the width of table in which TD lies or the upper container's width.Perhaps upper container's width is less than td's width .

    Thanks!
    Anjali Bansal

    ~Give your best and lead the world

  • #769333
    Hi Baiju.
    Use below html and jquery script to achieve your requirement.
    If you want to use td you need table, if not you can use div tags as below.


    <div class="109">
    <input value="Edit" id="edit" type="button">

    <input value="Cancel" id="cancel" type="button">
    </div>

    <script>
    $(".109").css("width", 140);
    <script>

    Find the attached screnshot.

    Sridhar Thota.
    Editor: DNS Forum.

    Delete Attachment


  • Sign In to post your comments